Prompt
How do I support biometric login through the device authenticator?
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
To support biometric login through the device authenticator, the usual pattern is:
-
Sign users in once with a primary method
- Example: username/password, magic link, or an existing auth provider.
- After that, enroll the device authenticator for future logins.
-
Register a device-bound credential
- Use the platform’s authenticator APIs:
- iOS: Face ID / Touch ID via
LocalAuthentication+ Keychain-backed credential storage - Android: BiometricPrompt + hardware-backed keystore / credential storage
- Web: WebAuthn / Passkeys through
navigator.credentials.create()
- iOS: Face ID / Touch ID via
- This creates or uses a public-key credential tied to the device and user.
- Use the platform’s authenticator APIs:
-
Require biometric verification at login
- On login, the app asks the authenticator to prove possession of the device-bound credential.
- The OS prompts for biometrics (Face ID / fingerprint / device PIN fallback depending on platform policy).
- The app receives a signed assertion / proof, then sends it to your backend for verification.
-
Verify on the server
- The backend should:
- check the credential is registered to that user
- verify the signature/assertion
- validate challenge, origin/RP ID, and counter/anti-replay data where applicable
- If valid, issue a normal session/token.
- The backend should:
-
Provide fallback recovery
- Biometrics can fail or be unavailable.
- Always support fallback such as:
- password
- recovery codes
- email/SMS only as a recovery path if acceptable
- support flow for lost device
Recommended approach by platform
Web
Use Passkeys / WebAuthn. This is the standard way to support biometric/device authenticator login in browsers.
Flow:
- backend generates challenge
- browser calls
navigator.credentials.get() - user confirms with biometric/device authenticator
- backend verifies assertion
Mobile apps
Use the native biometric prompt, but don’t rely on biometrics alone as the credential. Typical approach:
- biometric unlocks a private key or secure token stored in:
- iOS Keychain / Secure Enclave
- Android Keystore / StrongBox
- app signs a server challenge
- backend verifies signature
Important security notes
- Don’t store passwords directly behind biometrics.
- Biometrics should usually unlock a secret or approve a signed challenge, not act as the secret itself.
- Always use a server-issued nonce/challenge to prevent replay attacks.
- Support device change/loss and account recovery.
- Prefer passkeys/WebAuthn for cross-platform user experience where possible.
If you tell me your platform stack (web, iOS, Android, React Native, Flutter, backend language), I can give you a concrete implementation example.