How it works
biometric authenticationBiometric authenticationUnlocking a saved login with Face ID, Touch ID or a fingerprint.Open in glossary → in an app does not send your face or fingerprint anywhere. The phone checks you locally, and if it’s really you, it releases a secret the app saved earlier. To the server, it looks just like a normal login with a token.
On the phone
1. App asks the OS
“Please confirm it's you.” The OS shows its own Face ID, Touch ID or BiometricPrompt sheet. The app never gets the camera image or the fingerprint.
2. Secure hardware compares
The Secure Enclave (iPhone) or a trusted environment (Android) compares the scan with the stored template. The answer is only “match” or “no match”.
3. A secret is released
On a match, the Keychain (iOS) or Keystore (Android) unlocks a token or key the app saved when the user turned biometrics on.
On the server
4. Server checks the token
It receives the same kind of token as after a password login. It never sees a face or a fingerprint, and can't tell which finger was used.
The flow, step by step
- First login with a password. Biometrics can’t create an account or prove who you are the first time. The user always starts with their normal credentials (and 2FA, if the app uses it).
- The app offers biometrics (opt-in). “Use Face ID to log in next time?” The user decides. Many apps ask for one successful scan right away, to confirm it works.
- The app stores a secret behind biometrics. Usually a long-lived refresh tokenRefresh tokenA longer-lived token used only to get a new access token when the old one expires.Open in glossary → or a cryptographic key, saved in the iOS keychainKeychainiOS secure storage for small secrets like tokens and passwords; items can survive uninstalling the app.Open in glossary → or the Android KeystoreAndroid KeystoreAndroid's system for storing cryptographic keys so apps can use them but not extract them.Open in glossary → with a rule: “only release this after a successful biometric check”.
- Next time: the app asks the OS. The system shows its own sheet (Face ID, Touch ID or Android’s biometric prompt). The app only gets back “success”, “failed”, “canceled” or an error, never the image or the fingerprint.
Dev note
iOS apps use the LocalAuthentication framework; Android apps useBiometricPrompt(AndroidX Biometric library). - On success, the secret is released. The app sends the token to the server, which starts a new sessionSessionThe period during which a user stays logged in without entering their credentials again.Open in glossary →. On failure or cancel, the app must stay locked and offer a fallback.
Face ID, Touch ID and Android biometrics
| Platform | What the user sees | Worth knowing |
|---|---|---|
| iPhone with Face ID | A small Face ID sheet; a system prompt “Allow “App” to use Face ID?” the first time | The app needs a Face ID usage description (the sentence shown in that prompt) in its settings file. Without it, Face ID doesn’t work for the app. |
| iPhone/iPad with Touch ID | “Touch ID for “App”” sheet | No extra permission prompt. A missing Face ID description is invisible on Touch ID test phones, so it slips through. |
| Android | A system bottom sheet for fingerprint, face or iris | Biometrics come in classes. Class 3 (strong) can unlock Keystore keys; Class 2 (weak), common for camera-based face unlock, can’t. Banking apps often require Class 3. |
Dev note
NSFaceIDUsageDescription key in the app’s Info.plist. Android classes map to BIOMETRIC_STRONG (Class 3) and BIOMETRIC_WEAK (Class 2).Fallbacks and lockout
Biometrics fail all the time: wet fingers, gloves, a mask, bad light. So every biometric login needs a way out.
- App fallback: “Use password” (or a PIN set up in the app). It must be always reachable, not only after an error.
- Device passcode fallback: the OS can offer the phone’s passcode instead. Fine for some apps; banks often prefer their own password.
Dev note
iOS policy “biometrics or passcode”, AndroidDEVICE_CREDENTIAL. - OS lockoutBiometric lockoutThe OS turns off biometrics after repeated failed scans until the device passcode is entered.Open in glossary →: after 5 failed attempts iOS locks Face ID or Touch ID until the device passcode is entered. Android locks biometrics for about 30 seconds after several failures and requires the PIN, pattern or password after repeated lockouts. The app gets a “locked out” error and must show its fallback, not a dead end.
- Cancel means cancel. Tapping Cancel, swiping the sheet away, or a phone call interrupting the scan must leave the app locked.
When the biometrics on the phone change
Imagine Maya’s partner adds their own fingerprint to Maya’s phone, or sets up an “alternate appearance” in Face ID. Should the partner now get into Maya’s bank?
For sensitive apps the answer is no. Both platforms let the app notice the change:
- iOS: the Keychain item can be tied to the current set of enrolled faces or fingers. Adding or removing one makes the item unusable.
Dev note
The app can also compare a “domain state” value it saved earlier. - Android: a Keystore key can be set to be invalidated when a new biometric is enrolled. The next use fails with a “key permanently invalidated” error.
The expected behavior: turn biometric login off, ask for the password, then offer biometrics again. The test: add a face or finger in Settings, open the app, and make sure the new biometric does not unlock it.
Not available, not set up, not allowed
Before showing a “Use Face ID” button, the app must ask the OS whether biometrics are usable right now. Typical answers:
| Situation | Example | What the app should do |
|---|---|---|
| No hardware | Older Android phone, iPad without Touch ID | Never show biometric options |
| Not enrolled | User never set up Face ID or fingerprint | Hide the option, or explain “Set up Face ID in Settings first” |
| Not allowed | iOS user tapped “Don’t Allow” on the Face ID prompt, or switched it off in Settings › Face ID & Passcode › Other Apps | Explain it and show password login |
| Locked out | Too many failed scans | Show the password (or passcode) fallback |
Privacy around the prompt
- Nothing visible before unlock. When the app comes back from the background, account data must be hidden until the user is authenticated. A translucent lock screen over the balance is a privacy bug.
- App switcher snapshot. The app switcher shows a picture of the last screen. Banking apps cover or blur it. See Background and Foreground for how to test this.
- Which secret is stored? Storing the password itself behind biometrics is weaker than storing a token the server can revoke (cancel remotely). Ask the developers; it changes what “log out everywhere” and “change password” should do to biometric login.
Example requirements
Check this part
What does the banking server receive when you unlock the app with Face ID?
A tester adds a second fingerprint to the test phone. For a banking app, what is the expected result next time?
Fingerprint login works on an Android phone, but the banking app never offers face unlock. What should you check first?