How to sign in with both username or email using django-authtools?
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 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.
so, what do you suggest in other to make this possible
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.