edge icon indicating copy to clipboard operation
edge copied to clipboard

How to sign in with both username or email using django-authtools?

Open aswinkp opened this issue 8 years ago • 3 comments

I want users to signin with either username or email address. I did not see anything in documentation regarding this. Is this possible with django-authtools ?

aswinkp avatar Apr 04 '17 17:04 aswinkp

@aswinkp Edge currently uses django-authtools User class defined here. As you can see the email address acts like a primary key to the User model by being unique. If I were to change it to include username as well, I would start here and add the username field as well.

You will need to think of some design considerations like which will be the unique field and what happens when users don't signup with a username. I think django-allauth implements a solution for this.

arocks avatar Apr 13 '17 00:04 arocks

so, what do you suggest in other to make this possible

oyeyipo avatar Jan 10 '18 20:01 oyeyipo

Hi @MegaWale

If you mean how to start working on just adding username, I would start with looking at Django's AbstractUser implementation. If you are looking for django-allauth along with social authentication, then it might be seen in a future release but it would take significant refactoring.

arocks avatar Jan 14 '18 13:01 arocks