I have a django project in which I am using Django-rest-auth to do authentication. I want to use email with password to authenticate the user and not the username+password.
I have following settings in my settings.py but it didn't do anything for me:
REST_SESSION_LOGIN = True
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_AUTHENTICATION_METHOD = 'EMAIL'
ACCOUNT_EMAIL_VERIFICATION = 'optional'
How can I achieve it?
I'm using this package too, and by call this config it worked for me:
Be careful about this config, this config belongs to
django-allauth
, see this:Above class is a settings which is in
allauth
, so you write 'EMAIL' in lower case.I hope it helps
Following setting worked: