Fixed user authentication backend to allow login with email.
This commit is contained in:
parent
bdddb3cc03
commit
d683ea8839
2 changed files with 7 additions and 2 deletions
BIN
back/db.sqlite3
BIN
back/db.sqlite3
Binary file not shown.
|
@ -163,11 +163,16 @@ SITE_ID = 1
|
|||
|
||||
# Registration
|
||||
|
||||
ACCOUNT_USER_MODEL_USERNAME_FIELD = 'username'
|
||||
#ACCOUNT_USER_MODEL_USERNAME_FIELD = 'email'
|
||||
ACCOUNT_EMAIL_REQUIRED = True
|
||||
ACCOUNT_USERNAME_REQUIRED = False
|
||||
ACCOUNT_AUTHENTICATION_METHOD = 'email'
|
||||
|
||||
REST_AUTH_REGISTER_SERIALIZERS = {
|
||||
'REGISTER_SERIALIZER': 'users.serializers.RegisterSerializer',
|
||||
'REGISTER_SERIALIZER': 'users.serializers.RegisterSerializer',
|
||||
}
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'django.contrib.auth.backends.ModelBackend',
|
||||
'allauth.account.auth_backends.AuthenticationBackend',
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue