Hi everyone,
I am trying to implement a headless flow in django-allauth using email verification with a code (instead of a link). However, I’m running into a configuration error that I can’t seem to bypass.
Despite having my settings configured as requested by the documentation, I receive the following error during startup/validation:
allauth.account.errors.ImproperlyConfigured: ACCOUNT_EMAIL_VERIFICATION_BY_CODE_ENABLED requires ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
In my settings.py, I have defined the following:
# Allauth settings
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_EMAIL_VERIFICATION_BY_CODE_ENABLED = True
ALLAUTH_HEADLESS_ONLY = True
I’ve tried:
-
Double-checking for typos in the variable names.
-
Moving the settings higher/lower in the
settings.pyfile to ensure no overrides are happening. -
Verifying that I am using the latest version of
django-allauth.
It seems like the validation logic is not “seeing” the mandatory string correctly, or perhaps there is a specific interaction with the headless setup that I’m missing.