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)
- Facebook Graph API update create bug in Facebook Login HOT 1
- Login by code ("Magic code login") and unverified email addresses HOT 2
- HEADLESS_ONLY = True and socialaccount_connect combination HOT 3
- magic link only auth HOT 7
- Google provider not showing in list of providers when adding social application in admin app using version 0.63.2 HOT 4
- Doc mismatch for HEADLESS_FRONTEND_URLS setting HOT 1
- Check if email is already registered in POST `/account/signup` HOT 1
- Email2 field not being converted to lowercase, comparing fails HOT 4
- Incorrect link to demo in docs HOT 1
- Telegram authentication needs /setdomain for your website. HOT 1
- How to match existing, local accounts to social accounts by username? HOT 2
- Headless mode: reset password not working HOT 2
- is_existing not updating after saving a new user connected to SocialLogin HOT 3
- module 'jwt' has no attribute 'PyJWTError' HOT 2
- Headless Demo: Add ability to delete user HOT 1
- Headless Logout should return 200 instead of 401 HOT 2
- Adding class for input doesn't word HOT 1
- Document the usage of (dynamic) auth_params such as kc_idp_hint within provider_login_url
- [Headless] Auth not working in headless mode via sessionid cookie HOT 1
- Change in socialaccount providers imports causing pytest error HOT 2
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.