diff --git a/backend/utils/utils.py b/backend/utils/utils.py index 546799cb6..2795a6134 100644 --- a/backend/utils/utils.py +++ b/backend/utils/utils.py @@ -48,7 +48,7 @@ def create_token(data: dict, expires_delta: Union[timedelta, None] = None) -> st def decode_token(token: str) -> Optional[dict]: try: - decoded = jwt.decode(token, SESSION_SECRET) + decoded = jwt.decode(token, SESSION_SECRET, algorithms=[ALGORITHM]) return decoded except Exception as e: return None