Spaces:
Running
Running
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| model_config = SettingsConfigDict( | |
| env_file=".env", | |
| env_file_encoding="utf-8", | |
| case_sensitive=False, | |
| ) | |
| project_name: str = "Tranimal Auth Service" | |
| api_v1_prefix: str = "/api/v1" | |
| database_url: str | |
| jwt_secret_key: str = "CHANGE_ME" | |
| jwt_algorithm: str = "HS256" | |
| access_token_expire_minutes: int = 60 | |
| password_reset_token_expire_minutes: int = 30 | |
| email_verification_code_expire_minutes: int = 10 | |
| email_verification_verified_ttl_minutes: int = 30 | |
| password_reset_frontend_url: str = "http://localhost:3000/password-reset" | |
| smtp_host: str | None = None | |
| smtp_port: int = 587 | |
| smtp_username: str | None = None | |
| smtp_password: str | None = None | |
| smtp_use_tls: bool = True | |
| smtp_from_email: str | None = None | |
| smtp_from_name: str = "Run The Shape" | |
| google_oauth_client_id: str | None = None | |
| cors_origins: str = "http://localhost:3000,http://127.0.0.1:3000" | |
| watch_auth_allow_unauth_bootstrap: bool = True | |
| def cors_origin_list(self) -> list[str]: | |
| return [origin.strip() for origin in self.cors_origins.split(",") if origin.strip()] | |
| settings = Settings() | |