We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have next auth logic in my service:
The problem here is that simplejwt does not support token generation for inactive user
I think this logic is quite common, so maybe it has sense to add to settings something like:
SIMPLE_JWT = { "ALLOW_INACTIVE": True }
What do you think?
The text was updated successfully, but these errors were encountered:
For those one who's looking for this logic, it's in settings.py need to add next:
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.AllowAllUsersModelBackend'] def user_authentication_rule(user): return user SIMPLE_JWT = { ..., 'USER_AUTHENTICATION_RULE': 'django.conf.settings.user_authentication_rule', }
But I'm just wondering if that should be a default behaviour when the user authentication model is set to AllowAllUsersModelBackend
Sorry, something went wrong.
Mentioned method does not actually work.
The reason is this line: https://github.com/jazzband/djangorestframework-simplejwt/blob/master/rest_framework_simplejwt/authentication.py#L134
But I agree that the authentication backend should handle things like that.
Successfully merging a pull request may close this issue.
I have next auth logic in my service:
The problem here is that simplejwt does not support token generation for inactive user
I think this logic is quite common, so maybe it has sense to add to settings something like:
What do you think?
The text was updated successfully, but these errors were encountered: