We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcad9b0 commit 8ddcde7Copy full SHA for 8ddcde7
backend/btrixcloud/auth.py
@@ -112,7 +112,13 @@ def generate_jwt(data: dict, minutes: int) -> str:
112
# ============================================================================
113
def decode_jwt(token: str, audience: Optional[List[str]] = None) -> dict:
114
"""decode JWT token"""
115
- return jwt.decode(token, PASSWORD_SECRET, algorithms=[ALGORITHM], audience=audience)
+ return jwt.decode(
116
+ token,
117
+ PASSWORD_SECRET,
118
+ algorithms=[ALGORITHM],
119
+ options={"require": ["exp", "aud", "sub"]},
120
+ audience=audience,
121
+ )
122
123
124
0 commit comments