ACCOUNT_ for account-related settings, SOCIALACCOUNT_ for social authentication, or ALLAUTH_ for global settings.
Global Settings
ALLAUTH_DEFAULT_AUTO_FIELD
Type:str | NoneDefault:
NoneSource:
allauth/app_settings.py:48
Can be set to configure the primary key of all models.
ALLAUTH_TRUSTED_PROXY_COUNT
Type:intDefault:
0Source:
allauth/app_settings.py:52
As the X-Forwarded-For header can be spoofed, you need to configure the number of proxies that are under your control and hence, can be trusted. The default is 0, meaning no proxies are trusted. As a result, the X-Forwarded-For header will be disregarded by default.
ALLAUTH_TRUSTED_CLIENT_IP_HEADER
Type:str | NoneDefault:
NoneSource:
allauth/app_settings.py:62
If your service is running behind a trusted proxy that sets a custom header containing the client IP address, specify that header name here. The client IP will be extracted from this header instead of X-Forwarded-For.
Account Settings
General
ACCOUNT_ADAPTER
Type:strDefault:
"allauth.account.adapter.DefaultAccountAdapter"Source:
allauth/account/app_settings.py:390
Specifies the adapter class to use, allowing you to alter certain default behaviour. See Adapters for details.
ACCOUNT_FORMS
Type:dictDefault:
{}Source:
allauth/account/app_settings.py:464
Used to override the builtin forms. See Forms for details.
ACCOUNT_PREVENT_ENUMERATION
Type:bool | Literal["strict"]Default:
TrueSource:
allauth/account/app_settings.py:36
Controls whether or not information is revealed about whether or not a user account exists. For example, by entering random email addresses in the password reset form you can test whether or not those email addresses are associated with an account.
When set to "strict", allows signups to go through even with existing email addresses to prevent enumeration.
ACCOUNT_TEMPLATE_EXTENSION
Type:strDefault:
"html"Source:
allauth/account/app_settings.py:457
A string defining the template extension to use.
Signup
ACCOUNT_SIGNUP_FIELDS
Type:dictDefault: See below
Source:
allauth/account/app_settings.py:328
The fields to include in the signup form. Fields are specified as a dictionary where each key is a field name and the value is a dictionary with configuration options.
ACCOUNT_SIGNUP_FORM_CLASS
Type:str | NoneDefault:
NoneSource:
allauth/account/app_settings.py:314
A string pointing to a custom form class that is used during signup to ask the user for additional input. This class should derive from forms.Form and implement a def signup(self, request, user) method.
ACCOUNT_SIGNUP_FORM_HONEYPOT_FIELD
Type:str | NoneDefault:
NoneSource:
allauth/account/app_settings.py:321
Honeypot field name. Empty string or None will disable honeypot behavior. The field should be hidden to normal users but might be filled out by naive spam bots.
ACCOUNT_SIGNUP_REDIRECT_URL
Type:strDefault:
settings.LOGIN_REDIRECT_URLSource:
allauth/account/app_settings.py:242
The URL to redirect to directly after signing up.
Login
ACCOUNT_LOGIN_METHODS
Type:frozensetDefault:
{LoginMethod.USERNAME}Source:
allauth/account/app_settings.py:159
Specifies the login methods to use — whether the user logs in by entering their username, email address, phone number, or a combination.
ACCOUNT_LOGIN_TIMEOUT
Type:intDefault:
900 (15 minutes)Source:
allauth/account/app_settings.py:561
The maximum allowed time (in seconds) for a login to go through the various login stages. This limits, for example, the time span that the 2FA stage remains available.
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:402
Automatically log the user in once they confirmed their email address.
ACCOUNT_LOGIN_ON_PASSWORD_RESET
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:409
Automatically log the user in immediately after resetting their password.
ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS
Type:boolDefault:
TrueSource:
allauth/account/app_settings.py:398
Whether authenticated users are automatically redirected when accessing login/signup pages.
Login by Code
ACCOUNT_LOGIN_BY_CODE_ENABLED
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:545
Enables “Magic Code Login” where users receive a one-time code via email instead of entering a password.
ACCOUNT_LOGIN_BY_CODE_REQUIRED
Type:bool | set[str]Default:
FalseSource:
allauth/account/app_settings.py:570
When enabled, every user logging in is required to input a login confirmation code sent by email. Alternatively, specify a set of authentication methods ("password", "mfa", or "socialaccount") for which login codes are required.
ACCOUNT_LOGIN_BY_CODE_MAX_ATTEMPTS
Type:intDefault:
3Source:
allauth/account/app_settings.py:553
Maximum number of attempts the user has at inputting a valid code.
ACCOUNT_LOGIN_BY_CODE_TIMEOUT
Type:intDefault:
180 (3 minutes)Source:
allauth/account/app_settings.py:557
The code expiration time in seconds.
ACCOUNT_LOGIN_BY_CODE_TRUST_ENABLED
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:549
Enables the MFA “Trust this browser?” functionality for login by code. Requires the MFA app to be installed.
Logout
ACCOUNT_LOGOUT_ON_GET
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:423
Determines whether or not the user is automatically logged out by a GET request. For security reasons, POST requests are recommended.
ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:427
Determines whether or not the user is automatically logged out after changing their password.
ACCOUNT_LOGOUT_REDIRECT_URL
Type:strDefault:
settings.LOGOUT_REDIRECT_URL or "/"Source:
allauth/account/app_settings.py:417
The URL to return to after the user logs out.
Email Verification
ACCOUNT_EMAIL_VERIFICATION
Type:EmailVerificationMethodDefault:
EmailVerificationMethod.OPTIONALSource:
allauth/account/app_settings.py:89
Determines the email verification method during signup:
"mandatory": User is blocked from logging in until email is verified"optional": Email verification sent, but user can login with unverified email"none": No email verification mails are sent
ACCOUNT_EMAIL_VERIFICATION_BY_CODE_ENABLED
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:102
Controls whether email verification is performed by entering a code (True) or following a link (False).
ACCOUNT_EMAIL_VERIFICATION_BY_CODE_MAX_ATTEMPTS
Type:intDefault:
3Source:
allauth/account/app_settings.py:106
Maximum number of attempts for inputting a valid verification code.
ACCOUNT_EMAIL_VERIFICATION_BY_CODE_TIMEOUT
Type:intDefault:
900 (15 minutes)Source:
allauth/account/app_settings.py:110
The code expiration time in seconds.
ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS
Type:intDefault:
3Source:
allauth/account/app_settings.py:44
Determines the expiration date of email confirmation mails (number of days).
ACCOUNT_EMAIL_CONFIRMATION_HMAC
Type:boolDefault:
TrueSource:
allauth/account/app_settings.py:468
Use HMAC based keys that do not require server side state for email verification.
ACCOUNT_CONFIRM_EMAIL_ON_GET
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:394
Determines whether an email address is automatically confirmed by a GET request.
Email Management
ACCOUNT_EMAIL_REQUIRED
Type:boolDefault: Derived from
SIGNUP_FIELDSSource:
allauth/account/app_settings.py:77 (deprecated)
Whether the user is required to provide an email address when signing up. Use ACCOUNT_SIGNUP_FIELDS instead.
ACCOUNT_UNIQUE_EMAIL
Type:boolDefault:
TrueSource:
allauth/account/app_settings.py:213
Enforce uniqueness of email addresses. Only one user account can have an email address marked as verified.
ACCOUNT_MAX_EMAIL_ADDRESSES
Type:int | NoneDefault:
NoneSource:
allauth/account/app_settings.py:135
The maximum amount of email addresses a user can associate to their account.
ACCOUNT_CHANGE_EMAIL
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:139
When enabled, users are limited to having exactly one email address that they can change by adding a temporary second email address.
ACCOUNT_EMAIL_MAX_LENGTH
Type:intDefault:
254Source:
allauth/account/app_settings.py:172
Maximum length of the email field.
ACCOUNT_EMAIL_SUBJECT_PREFIX
Type:str | NoneDefault:
NoneSource:
allauth/account/app_settings.py:307
Subject-line prefix for email messages sent. By default, the name of the current Site is used.
ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS
Type:boolDefault:
TrueSource:
allauth/account/app_settings.py:529
Configures whether password reset attempts for email addresses without an account result in sending an email.
ACCOUNT_EMAIL_NOTIFICATIONS
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:537
When enabled, account-related security notifications will be emailed.
Password Management
ACCOUNT_PASSWORD_MIN_LENGTH
Type:int | NoneDefault:
6 (if no Django validators)Source:
allauth/account/app_settings.py:248
Minimum password length. Only used if Django’s AUTH_PASSWORD_VALIDATORS is empty.
ACCOUNT_PASSWORD_INPUT_RENDER_VALUE
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:383
render_value parameter as passed to PasswordInput fields.
ACCOUNT_PASSWORD_RESET_BY_CODE_ENABLED
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:505
Controls whether password reset is performed by entering a code (True) or following a link (False).
ACCOUNT_PASSWORD_RESET_BY_CODE_MAX_ATTEMPTS
Type:intDefault:
3Source:
allauth/account/app_settings.py:509
Maximum number of attempts for inputting a valid password reset code.
ACCOUNT_PASSWORD_RESET_BY_CODE_TIMEOUT
Type:intDefault:
180 (3 minutes)Source:
allauth/account/app_settings.py:513
The code expiration time in seconds.
ACCOUNT_PASSWORD_RESET_TOKEN_GENERATOR
Type:strDefault:
"allauth.account.forms.EmailAwarePasswordResetTokenGenerator"Source:
allauth/account/app_settings.py:517
A string pointing to a custom token generator for password resets.
Phone Number
ACCOUNT_PHONE_VERIFICATION_ENABLED
Type:boolDefault:
TrueSource:
allauth/account/app_settings.py:179
Whether phone number verification is enabled.
ACCOUNT_PHONE_VERIFICATION_MAX_ATTEMPTS
Type:intDefault:
3Source:
allauth/account/app_settings.py:183
Maximum number of attempts for phone verification.
ACCOUNT_PHONE_VERIFICATION_TIMEOUT
Type:intDefault:
900 (15 minutes)Source:
allauth/account/app_settings.py:209
Phone verification code timeout in seconds.
Username
ACCOUNT_USERNAME_REQUIRED
Type:boolDefault: Derived from
SIGNUP_FIELDSSource:
allauth/account/app_settings.py:357 (deprecated)
Whether the user is required to enter a username when signing up. Use ACCOUNT_SIGNUP_FIELDS instead.
ACCOUNT_USERNAME_MIN_LENGTH
Type:intDefault:
1Source:
allauth/account/app_settings.py:369
Minimum username length.
ACCOUNT_USERNAME_BLACKLIST
Type:list[str]Default:
[]Source:
allauth/account/app_settings.py:376
List of usernames that are not allowed.
ACCOUNT_USERNAME_VALIDATORS
Type:str | NoneDefault:
NoneSource:
allauth/account/app_settings.py:480
A path to a list of custom username validators.
ACCOUNT_PRESERVE_USERNAME_CASING
Type:boolDefault:
TrueSource:
allauth/account/app_settings.py:476
Whether to preserve username casing or store in lowercase.
User Model
ACCOUNT_USER_MODEL_USERNAME_FIELD
Type:strDefault:
"username"Source:
allauth/account/app_settings.py:431
The name of the field containing the username.
ACCOUNT_USER_MODEL_EMAIL_FIELD
Type:strDefault:
"email"Source:
allauth/account/app_settings.py:435
The name of the field containing the email.
Reauthentication
ACCOUNT_REAUTHENTICATION_REQUIRED
Type:boolDefault:
FalseSource:
allauth/account/app_settings.py:541
Whether reauthentication is required before the user can alter their account.
ACCOUNT_REAUTHENTICATION_TIMEOUT
Type:intDefault:
300 (5 minutes)Source:
allauth/account/app_settings.py:533
Before asking the user to reauthenticate, check if a successful (re)authentication happened within this many seconds.
Rate Limits
ACCOUNT_RATE_LIMITS
Type:dictDefault: See below
Source:
allauth/account/app_settings.py:260
Rate limits for various actions. Set to False to disable all rate limiting.
Sessions
ACCOUNT_SESSION_REMEMBER
Type:bool | NoneDefault:
NoneSource:
allauth/account/app_settings.py:448
Controls the life time of the session. Set to None to ask the user (“Remember me?”), False to not remember, and True to always remember.
Social Account Settings
SOCIALACCOUNT_ADAPTER
Type:strDefault:
"allauth.socialaccount.adapter.DefaultSocialAccountAdapter"Source:
allauth/socialaccount/app_settings.py:123
Specifies the adapter class to use for social accounts.
SOCIALACCOUNT_AUTO_SIGNUP
Type:boolDefault:
TrueSource:
allauth/socialaccount/app_settings.py:19
Attempt to bypass the signup form by using fields retrieved from the social account provider.
SOCIALACCOUNT_EMAIL_REQUIRED
Type:boolDefault: Derived from
ACCOUNT_SIGNUP_FIELDSSource:
allauth/socialaccount/app_settings.py:63
Whether the user is required to provide an email address when signing up via social account.
SOCIALACCOUNT_EMAIL_VERIFICATION
Type:EmailVerificationMethod | NoneDefault:
NoneSource:
allauth/socialaccount/app_settings.py:74
Email verification method for social accounts. When None, the default allauth.account logic applies.
SOCIALACCOUNT_EMAIL_AUTHENTICATION
Type:boolDefault:
FalseSource:
allauth/socialaccount/app_settings.py:90
When enabled and the provider is fully trusted, treat a social login with a verified email as a login to an existing local account with that email, even if the social account is not connected.
SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT
Type:boolDefault:
FalseSource:
allauth/socialaccount/app_settings.py:109
When email authentication is applied, whether the social account is automatically connected to the local account.
SOCIALACCOUNT_FORMS
Type:dictDefault:
{}Source:
allauth/socialaccount/app_settings.py:130
Used to override the builtin social account forms.
SOCIALACCOUNT_PROVIDERS
Type:dictDefault:
{}Source:
allauth/socialaccount/app_settings.py:28
Provider-specific settings.
SOCIALACCOUNT_STORE_TOKENS
Type:boolDefault:
FalseSource:
allauth/socialaccount/app_settings.py:138
Whether to store OAuth tokens in the database.
SOCIALACCOUNT_REQUESTS_TIMEOUT
Type:intDefault:
5Source:
allauth/socialaccount/app_settings.py:150
Timeout for requests to social account providers.
