You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.
I ran into an issue where the login_required decorator was always saying that the user was not logged in. After some debugging I realized that it was because I had changed my user model to use email as the USERNAME_FIELD rather than username.
My username was always set to null, so when the JWT was created on this line:
I ran into an issue where the login_required decorator was always saying that the user was not logged in. After some debugging I realized that it was because I had changed my user model to use email as the USERNAME_FIELD rather than username.
My username was always set to null, so when the JWT was created on this line:
https://github.com/binarytree-software/django-ariadne-jwt/blob/master/django_ariadne_jwt/utils.py#L74
the token created didn't have a user identifier in it.
I was able to get around that by adding this to my user model.
Would be great if we could tell the library if we aren't using "username". Or if it could just use the USERNAME_FIELD from the user model.
Thanks!
The text was updated successfully, but these errors were encountered: