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

@@ -72,4 +72,8 @@ async def refresh(refresh_token: str, iss: ProvidersType, session: AsyncSession
raise HTTPException(status_code=401, detail="Refresh token is invalid.")
key_pair = await refresh_token_rotation(sessions_repo, token_entry, iss)
return UserTokens(access_token=key_pair.access_token, refresh_token=key_pair.refresh_token)
return UserTokens(
access_token=key_pair.access_token,
refresh_token=key_pair.refresh_token,
expires_at=key_pair.expires_at,
)