Releases: sultaniman/django-auth0
Tiny
This update addresses two issues #4 #5 to provide users with more consistent processing of usernames and emails thanks to @brendonjohn.
Release details
the order of values in AUTHENTICATION_BACKENDS for a projects settings is the order that Django will attempt to authenticate a user. If the Auth0Backend is used first, you're not able to login to the Django admin. This is because Auth0Backend assumes an email will be provided and then raise a Value error.
#5
In the Auth0Backend
the authenticate method handles the auth0 payload.
The username field for users are supposed to be unique. Currently the nickname
key in the payload is used as the username. This is not suitable as the nickname is not unique.
Example:
- I sign up an account where my email is [email protected]. Auth0 will provide brendon as the nickname
- Someone else signs up where their email is brendon@newperson. Auth0 will set their nickname to also be brendon.
When the second user attempts to signup, the unique constraint on the username field will be violated and so an error is thrown.
Auth0 gives two methods for identifying users. I suggest replacing the use of nickname
with user_id