Skip to content

Commit

Permalink
Fix jwt expiration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vincevd1 committed May 15, 2024
1 parent 40a0f83 commit c63dda9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server/middleware/thaliamiddleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __call__(self, request):
if hasattr(request, 'path') and request.path.startswith("/api"):
if('token' in request.COOKIES):
jwt_token = request.COOKIES["token"]
token_decoded = jwt.decode(jwt=jwt_token, key=settings.RSA_PUB_KEY, algorithms=["RS256"], audience=settings.CLIENT_ID)
token_decoded = jwt.decode(jwt=jwt_token, key=settings.RSA_PUB_KEY, algorithms=["RS256"], audience=settings.CLIENT_ID, options={"verify_exp": False})

request.user_id = token_decoded["sub"]
else:
Expand Down

0 comments on commit c63dda9

Please sign in to comment.