Django allauth: Multiple user registration with email-only authentication causing UNIQUE constraint error

92 Views Asked by At

I have an issue with a django allauth project

I typed that in settings.py to disable username field and use email address

SOCIALACCOUNT_QUERY_EMAIL = True
ACCOUNT_LOGOUT_ON_GET= True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_EMAIL_REQUIRED = True
SOCIALACCOUNT_LOGIN_ON_GET = True

when I register for the first time it successfull, but when i tries to register another user raised me error : UNIQUE constraint failed: auth_user.username

error with seccond register

I expect that happend because unique not effected to field

0

There are 0 best solutions below