feat(auth): include expires_at in token responses and KeyPair DTO

This commit is contained in:
2026-07-24 13:25:04 +07:00
parent 9187fbb970
commit d59f96473d
9 changed files with 110 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ def generate_pair(user_id: int, iss: ProvidersType) -> KeyPair:
access_token = generate_jwt(payload.model_dump())
refresh_token = secrets.token_urlsafe(32)
return KeyPair(access_token=access_token, refresh_token=refresh_token)
return KeyPair(access_token=access_token, refresh_token=refresh_token, expires_at=payload.exp)
def hash_refresh_token(token: str):