Ability to allow inactive users
gabrielfgularte opened this issue · 0 comments
gabrielfgularte commented
Expected behaviour
We should have a setting to allow inactive users to login normally on do_complete
method.
Actual behaviour
The do_complete
method checks user.is_active
regardless the project allows or not inactive users to login.
What are the steps to reproduce this issue?
Input clear steps to reproduce the issue for a maintainer.
- create a user
- inactivate it
- try to login and you'll be redirected to the
SOCIAL_AUTH_INACTIVE_USER_URL
falling back toLOGIN_ERROR_URL
and then to toLOGIN_URL
.
Any other comments?
On Django, we have the AllowAllUsersModelBackend
that when used instead of ModelBackend allow inactive users to login. So what I'm planning to do is to add a new settings ALLOW_INACTIVE_USERS_LOGIN
and then check this setting on the on_complete
method before the utils.user_is_active
check.