feat(auth): include expires_at in token responses and KeyPair DTO
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user