We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f518e6c commit deecf68Copy full SHA for deecf68
db/admin_config.py
@@ -0,0 +1,17 @@
1
+from typing import Optional
2
+
3
+from pydantic import field_validator
4
+from pydantic_settings import BaseSettings, SettingsConfigDict
5
6
7
+class AdminSettings(BaseSettings):
8
+ auth0_custom_domain: Optional[str]
9
+ admin_client_id: Optional[str]
10
+ admin_client_secret: Optional[str]
11
+ model_config = SettingsConfigDict(env_file=".env", extra="ignore")
12
13
+ @field_validator("auth0_custom_domain", mode="before")
14
+ def strip_trailing_slash(cls, value: str) -> str:
15
+ if isinstance(value, str):
16
+ return value.rstrip("/")
17
+ return value
0 commit comments