mirror of
https://github.com/open-webui/open-webui
synced 2024-11-23 00:27:40 +00:00
Call jwt.decode
with the expected algorithms
This commit is contained in:
parent
e15dbdc46a
commit
4fceb404bd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user