Passwords are the weakest link in account security. They can be phished, leaked, reused, or forgotten. That’s why we’ve added support for WebAuthn passkeys - a phishing-resistant, passwordless authentication method that’s both more secure and more convenient.
What Are Passkeys?
Passkeys are cryptographic credentials stored on your device (phone, laptop, security key) that replace passwords for authentication. They use the WebAuthn standard (part of FIDO2) and provide several advantages:
- Phishing-resistant - Passkeys are bound to the website’s domain, so they can’t be used on fake sites
- No secrets to leak - Only the public key is stored on the server
- Device-bound - The private key never leaves your device
- Biometric-protected - Typically secured by Face ID, Touch ID, or Windows Hello
- Cross-device sync - Modern platforms sync passkeys across devices via iCloud, Google, or Microsoft accounts
Our Implementation
We integrated WebAuthn passkey support into our existing django-allauth authentication stack, providing both web and mobile API endpoints.
Registration Flow
When a user registers a new passkey, the flow works like this:
- Client requests registration options from the server
- Server generates a challenge with user and relying party information
- Browser’s WebAuthn API prompts the user (biometric or security key)
- Client sends credential back to the server
- Server verifies and stores the public key
| |
Authentication Flow
For two-factor authentication using a passkey:
- User completes primary authentication (username/password or social login)
- Server returns challenge for WebAuthn verification
- Browser prompts for passkey (biometric touch)
- Credential is verified against stored public key
- User is fully authenticated
| |
Passkey Management
Users can manage their registered passkeys:
- List all passkeys with registration date and last usage
- Rename passkeys for easier identification (e.g., “iPhone”, “MacBook”)
- Delete passkeys (with protection against removing the last authenticator)
| |
API Endpoints
Our REST API provides full WebAuthn support for the mobile app:
| Endpoint | Method | Description |
|---|---|---|
/api/webauthn/register/options/ | GET | Get registration challenge |
/api/webauthn/register/complete/ | POST | Complete registration |
/api/webauthn/authenticate/options/ | GET | Get authentication challenge |
/api/webauthn/verify/ | POST | Verify credential for 2FA |
/api/webauthn/ | GET | List registered passkeys |
/api/webauthn/<id>/ | PATCH | Rename a passkey |
/api/webauthn/<id>/ | DELETE | Delete a passkey |
Security Considerations
Recovery Codes
When a user registers their first authenticator (passkey or TOTP), we automatically generate recovery codes. These one-time-use codes can be used if all other authentication methods become unavailable:
| |
Preventing Lockout
Users cannot delete their last passkey if it would leave them without any two-factor authentication method:
| |
Monitoring
We track passkey usage via Datadog metrics for security monitoring:
| |
Browser Support
WebAuthn is supported in all modern browsers:
- Chrome 67+
- Firefox 60+
- Safari 13+
- Edge 79+
- Mobile Chrome, Safari, Firefox
For older browsers, users can still use TOTP (authenticator apps) or recovery codes.
The User Experience
Adding a passkey takes just seconds:
- Go to Settings → Security → Two-Factor Authentication
- Click Add Passkey
- Name your device (e.g., “iPhone 15”)
- Authenticate with Face ID / Touch ID / Windows Hello
- Done! Your passkey is registered
Future logins require just a biometric confirmation - no typing passwords or copying codes from authenticator apps.
Why We Chose Passkeys
| Method | Phishing Risk | User Experience | Recovery |
|---|---|---|---|
| Passwords | High | Poor (forgotten, weak) | Email reset |
| SMS 2FA | Medium (SIM swap) | Okay | Phone number |
| TOTP Apps | Low | Manual code entry | Backup keys |
| Passkeys | Very Low | Excellent | Recovery codes |
Passkeys represent the future of authentication. They’re already supported by Apple, Google, and Microsoft platforms, making them accessible to nearly all our users.
Ready to go passwordless? Enable passkeys in your security settings!
