Skip to content

Commit be1aa11

Browse files
committed
feat: enhance session management with token expiration handling
- Updated the session management to include token expiration by passing the expiry time to the set_session function. - Improved the authentication callback to handle token data more effectively.
1 parent b3658be commit be1aa11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/routers/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ async def callback(request: Request, code: str, state: str = "default"):
5454
raise HTTPException(status_code=400, detail="Auth failed")
5555

5656
token_data = token_response.json()
57-
set_session(session_id, token_data)
57+
expiry = token_data['expires_in']
58+
set_session(session_id, token_data, expiry)
5859
access_token = token_data['access_token']
5960
user_info = jwt.decode(access_token, options={"verify_signature": False})
6061

0 commit comments

Comments
 (0)