diff --git a/backend/src/auth/__init__.py b/backend/src/auth/__init__.py index 565a0a8..ec6df94 100644 --- a/backend/src/auth/__init__.py +++ b/backend/src/auth/__init__.py @@ -61,11 +61,11 @@ async def get_current_user(db: SessionDependency, token: str = Depends(oauth2_sc def create_access_token(data: dict, expires_delta: timedelta | None = None): to_encode = data.copy() - config = AuthConfig + auth_config = AuthConfig if expires_delta: expire = datetime.now(timezone.utc) + expires_delta else: - expire = datetime.now(timezone.utc) + timedelta(minutes=config.jwt_access_token_lifetime) + expire = datetime.now(timezone.utc) + timedelta(minutes=auth_config.jwt_access_token_lifetime) to_encode.update({"exp": expire}) - encoded_jwt = jwt.encode(to_encode, config.jwt_signing_key, algorithm=config.jwt_signing_algorithm) + encoded_jwt = jwt.encode(to_encode, auth_config.jwt_signing_key, algorithm=auth_config.jwt_signing_algorithm) return encoded_jwt