Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Support latest django-graphql-jwt

jxltomb9c570354c4c
diff --git a/Pipfile b/Pipfile
index 72f7349287..3466f5188b 100644
--- a/Pipfile
+++ b/Pipfile
@@ -20,7 +20,7 @@ django-cache-url = ">=1.0.0"
django-countries = ">=5.2"
django-filter = ">=2.0"
django-fsm = ">=2.6.0"
-django-graphql-jwt = ">=0.1.9,<0.1.13"
+django-graphql-jwt = ">=0.1.13"
django-impersonate = ">=1.3"
django-measurement = "==3.0.0"
django-mptt = ">=0.7.1"
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.py
index 41c0decf3e..792f47a3bf 100644
--- a/saleor/graphql/core/mutations.py
+++ b/saleor/graphql/core/mutations.py
@@ -6,7 +6,7 @@ from graphene.types.mutation import MutationOptions
from graphene_django.registry import get_global_registry
from graphql.error import GraphQLError
from graphql_jwt import ObtainJSONWebToken, Verify
-from graphql_jwt.exceptions import GraphQLJWTError, PermissionDenied
+from graphql_jwt.exceptions import JSONWebTokenError, PermissionDenied
from ...account import models
from ..account.types import User
@@ -330,7 +330,7 @@ class CreateToken(ObtainJSONWebToken):
def mutate(cls, root, info, **kwargs):
try:
result = super().mutate(root, info, **kwargs)
- except GraphQLJWTError as e:
+ except JSONWebTokenError as e:
return CreateToken(errors=[Error(message=str(e))])
else:
return result