Open Cimmanuel opened 3 years ago
I've experienced exactly the same. I think this field is fundamentally broken. The only thing that I can do is to remove the token_auth decorator on the mutation:
class ObtainJSONWebToken(mixins.ResolveMixin, JSONWebTokenMutation):
"""Obtain JSON Web Token mutation"""
# By default this has a @token_auth decorator
@classmethod
def mutate(cls, root, info, **kwargs):
return cls.resolve(root, info, **kwargs)
That bypasses the credentials problem but unfortunately then I get:
{'errors': [{'message': 'Cannot return null for non-nullable field ObtainJSONWebToken.token.', 'locations': [{'line': 4, 'column': 21}], 'path': ['token_auth', 'token']}], 'data': {'token_auth': None}}
Presumably because there doesn't seem to be any code there to actually get the token and return it. It's nuts.
Hello! I am using Django 3.1.4 alongside the most recent version of this library and trying to obtain a token but I keep getting:
I have done everything right but this keeps happening. I am using a custom user model and I have created my own authentication backend as mentioned in #46. If I try logging in with an email, it throws that error, but if I use a username, it works fine. Anyone experiencing something similar?
Here's my setup: