fix auth login / logout / refresh token

This commit is contained in:
Julien Aldon
2026-02-19 16:20:45 +01:00
parent acbaadff67
commit 1bd0583c70
2 changed files with 14 additions and 5 deletions

View File

@@ -219,7 +219,15 @@ def refresh_token(refresh_token: Annotated[str | None, Cookie()] = None):
httponly=True,
secure=True if settings.debug == False else True,
samesite='lax',
max_age=4
max_age=30 * 24 * settings.max_age
)
response.set_cookie(
key='id_token',
value=token_data['id_token'],
httponly=True,
secure=not settings.debug,
samesite='lax',
max_age=settings.max_age
)
return response