summaryrefslogtreecommitdiff
path: root/src/services/api/graphql/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/api/graphql/libs')
-rw-r--r--src/services/api/graphql/libs/token_auth.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/services/api/graphql/libs/token_auth.py b/src/services/api/graphql/libs/token_auth.py
index 3ecd8b855..2100eba7f 100644
--- a/src/services/api/graphql/libs/token_auth.py
+++ b/src/services/api/graphql/libs/token_auth.py
@@ -54,6 +54,9 @@ def get_user_context(request):
user_id: str = payload.get('sub')
if user_id is None:
return context
+ except jwt.exceptions.ExpiredSignatureError:
+ context['error'] = 'expired token'
+ return context
except jwt.PyJWTError:
return context
try: