You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to keep ACCOUNT_UNIQUE_EMAIL = False and still allow sign-ins with email.
Our user requires a unique-together constraint on user.email, user.type, so it's possbile for a user to have two accounts of different types with the same email. How we would handle signups/logins against the correct user types is by overriding allauth's AuthenticationBackend and check some platform specific info in the request object.
However, it seems the following in AppSettings is blocking this config:
Seems inefficient if you think about it? It's merely the same user no? Allauth has an EmailAddress table so that a single account/User record has multiple emails if that helps.
We have the same use case and stumbled onto this: we run a contest, the contest have different "seasons" and an User can subscribe multiple times, but only once per season.
So we can filter all user queryset by season period and we want to keep intact the confirmation email flow and login by email, but this settings makes really difficult to achieve what we need.
If you don't take special care the combination of ACCOUNT_UNIQUE_EMAIL=False and login by email is a tricky one. So removing that constraint altogether may signal the wrong message, so I would prefer to use https://docs.djangoproject.com/en/4.2/topics/checks/ and turn it into a warning that can be silenced by people that know what they are getting into (settings.SILENCED_SYSTEM_CHECKS).
I want to be able to keep
ACCOUNT_UNIQUE_EMAIL = False
and still allow sign-ins with email.Our user requires a unique-together constraint on
user.email, user.type
, so it's possbile for a user to have two accounts of different types with the same email. How we would handle signups/logins against the correct user types is by overriding allauth's AuthenticationBackend and check some platform specific info in therequest
object.However, it seems the following in AppSettings is blocking this config:
django-allauth/allauth/account/app_settings.py
Lines 23 to 26 in 3533862
Is there any way around this? Or do you have any recommendations on how to handle such a use case?
Thanks.
The text was updated successfully, but these errors were encountered: