pythondjangoauthenticationdjango-allauth

Accept username OR email for logging in with django-allauth


I see django-allauth supports forcing users to login using their email address, and doesn't ask them for a username when signing up (instead generating one automatically from the email address) - https://stackoverflow.com/a/19683532/221001

Is it possible to have a user sign up, entering an email address and username manually, and then allow them to sign in using either? (e.g. there are two fields on the Login page: "username or email" and "password")


Solution

  • As Yogesh posted above, the username_email value for ACCOUNT_AUTHENTICATION_METHOD does the job.

    http://django-allauth.readthedocs.org/en/latest/configuration.html