diff --git a/backend/app/auth.py b/backend/app/auth.py index 4fbe17b..15905e0 100644 --- a/backend/app/auth.py +++ b/backend/app/auth.py @@ -13,7 +13,7 @@ from .config import settings SECRET_KEY = settings.secret_key ALGORITHM = "HS256" -ACCESS_TOKEN_EXPIRE_MINUTES = 60 +ACCESS_TOKEN_EXPIRE_MINUTES = settings.access_token_expire_minuted pwd_context = CryptContext(schemes=["bcrypt_sha256"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/auth/token") diff --git a/backend/app/config.py b/backend/app/config.py index 17bf487..e530c49 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -14,6 +14,8 @@ class Settings(BaseModel): secret_key: str = os.getenv("SECRET_KEY", "CHANGE_ME") + access_token_expire_minuted: int = int(os.getenv("ACCESS_TOKEN_EXPIRE_MINUTES", "60")) + @property def database_url(self): return (