api/app/config.py
Yoga Pangestu 08cc2bebbe Add Google login functionality and update requirements
- Implement Google login endpoint with credential verification
- Add GoogleLoginRequest schema for handling login requests
- Update Settings class to include GOOGLE_CLIENT_ID
- Add google-auth package to requirements
2026-07-22 16:50:11 +07:00

27 lines
664 B
Python

from urllib.parse import quote_plus
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
DB_HOST: str = "localhost"
DB_PORT: int = 3306
DB_USER: str = "root"
DB_PASS: str = ""
DB_NAME: str = ""
DB_ECHO: bool = False
SECRET_KEY: str = "change-me-to-a-random-secret-key"
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 1440
GOOGLE_CLIENT_ID: str = ""
@property
def DATABASE_URL(self) -> str:
return f"mysql+pymysql://{self.DB_USER}:{quote_plus(self.DB_PASS)}@{self.DB_HOST}:{self.DB_PORT}/{self.DB_NAME}"
class Config:
env_file = ".env"
settings = Settings()