Authentication & Account Security
The deployed app uses the same authentication foundation as this project: headless django-allauth, email-first sign-in, passwordless login codes, passkeys, social login, multi-factor authentication, and session controls. You are not starting from a blank auth screen or a custom auth rewrite.
Authentication snapshot
The current project already enables the main authentication modes and account protection flows below.
| Capability | Current project status |
|---|---|
| Primary login method | Email-only authentication |
| Email verification | Mandatory and code-based verification enabled |
| Passwordless sign-in | Email login codes are enabled |
| Passkeys | Passkey login and passkey signup are enabled |
| MFA methods | TOTP, WebAuthn security keys, and recovery codes |
| Social sign-in | Provider-driven, with Google setup already documented |
| Session control | Active sessions can be listed and revoked |
How users can sign in
The login and signup experience is not limited to a single credential type. Users can choose the path that best fits the app and their security posture.
Email and password
Signup and login are email-first. Users create accounts with email plus password confirmation and sign in without a username field.
Passwordless login codes
Login-by-code is enabled, so users can request a one-time sign-in code by email instead of using a password.
Passkeys and WebAuthn
Passkey login and passkey signup are both enabled, and additional WebAuthn credentials can be managed as MFA authenticators.
Google sign-in
Social login buttons are driven by allauth provider config. Google is already wired into the project, includes a One Tap prompt, and has a dedicated setup tutorial.
Verification, recovery, and ongoing account safety
Authentication does not stop at the login form. The app also includes the safety rails users expect once accounts exist in production.
Mandatory verification
New accounts must verify their email address before they are fully active, and this project is configured to support verification by code.
Recovery flows
The auth stack includes password reset, email verification, and branded login-code emails so account access can be recovered without custom plumbing.
Two-factor authentication
Users can activate TOTP, register WebAuthn security keys, and generate recovery codes from the account security area.
Session management
The app tracks active sessions and exposes a session management screen so users can review and revoke other devices.
What the app emails users about
The project already includes branded templates for the core auth emails users will actually receive.
- Email confirmation for new accounts
- Passwordless sign-in code emails
- Password reset emails
Implementation details
Under the hood, the app uses headless allauth endpoints and a frontend auth client instead of custom auth endpoints scattered across the codebase.
Settings snapshot
These are the key auth settings that are already enabled in this project.
ACCOUNT_EMAIL_VERIFICATION = "mandatory"ACCOUNT_LOGIN_METHODS = {"email"}ACCOUNT_LOGIN_BY_CODE_ENABLED = TrueMFA_SUPPORTED_TYPES = ["totp", "webauthn", "recovery_codes"]MFA_PASSKEY_LOGIN_ENABLED = TrueMFA_PASSKEY_SIGNUP_ENABLED = TrueACCOUNT_EMAIL_VERIFICATION_BY_CODE_ENABLED = TrueHEADLESS_ONLY = True
Headless auth architecture
The frontend talks to the browser-side allauth API under /_allauth/browser/v1.
That gives the deployed app one consistent auth layer for login, signup, provider redirects, passkeys, MFA challenges, password reset, email verification, and session management.
Google sign-in is already supported here, and the deployment-specific provider setup is documented in the Google OAuth setup guide.
