Comments (3)
Django has the email field defined like this:
class AbstractUser(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(_("email address"), blank=True)
You deviate from that by doing:
email = models.EmailField(_("email address"), blank=False, null=False, unique=True)
So, you're making it unique. When the user model has an email field allauth populates that, even if the email address is still unverified. Note that allauth allows for 2 different users to have the same email address, though only one user can have it listed as verified.
Given your user model definition, I think the only way around would be to not populate the email field for users unless it is truly verified. You could do that by setting ACCOUNT_USER_MODEL_EMAIL_FIELD
to None
-- then allauth won't do any attempt to populate the field. Then, you could use e.g. the email_confirmed
signal to actually start populating the field.
Though, you can also ask yourself, why go against the flow, and why not just use Django's standard way of working? Or, perhaps remove the email field from the user altogether as it really is just denormalized data (of the EmailAddress
model).
from django-allauth.
...my assumption would have been that this is intercepted.
As mentioned above, your email field deviates from what is standard in Django, and allauth has no knowledge about how you want to have that populated. So I don't really see how this can be intercepted. Just set ACCOUNT_USER_MODEL_EMAIL_FIELD = None
.
from django-allauth.
Hi, thanks for the quick reply. I guess that will help :)
from django-allauth.
Related Issues (20)
- SOCIALACCOUNT_PROVIDER nextcloud ignores settings HOT 8
- linkedin_oauth2 HOT 1
- Lichess.org Provider Support HOT 1
- Github verified email does not seem to work HOT 2
- Option to allow one-time password login for old users when using SOCIALACCOUNT_ONLY HOT 1
- how to add support for SAML federations HOT 3
- headless api documentation HOT 2
- Microsoft Login (Social Account) HOT 1
- 0.62.0: Contains site-packages/tests directory HOT 1
- admin confirmation after email confirmation HOT 3
- Setting SOCIALACCOUNT_ONLY = True results in template error when trying to perform a social login, "Reverse for 'account_signup' not found. 'account_signup' is not a valid view function or pattern name". HOT 4
- Still receiving save() prohited to prevent data loss due to unsaved related objec HOT 2
- Telegram views CallbackView 'bool' object has no attribute 'pop' HOT 2
- typo in comments 'cocunt' plugin HOT 1
- sociallogin.is_existing fails if existing user associated in adapter.new_user HOT 2
- Better template tags and files HOT 3
- Deprecated signature algorithm SAML HOT 2
- Account provider not listed/visible HOT 2
- Provider is not showing up in Django admin and getting ImproperlyConfigured error after setting up django-allauth HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-allauth.