Biometric Login
How Face ID, Touch ID and Android fingerprint or face unlock really work in apps, what breaks around opt-in, fallbacks, lockouts and changed biometrics, and how to test it all on simulators, emulators and real phones.
You open your banking app, glance at the phone, and your balance appears. No password, no code. It feels like magic, and because it’s so effortless, people trust it completely. That trust is exactly why testers must be strict here. If a glance from someone else’s face opens the account, or a tap on Cancel does, the “magic” is a security hole in millions of pockets.
Biometric login is also full of awkward real-life moments: wet fingers, sunglasses, a phone handed to a child, a new fingerprint added by a partner, Face ID switched off in Settings. A good app handles each of them calmly. A buggy one locks people out or, worse, lets the wrong people in.
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 token 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 Keystore 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 BiometricPrompt). The app only gets back “success”, “failed”, “canceled” or an error, never the image or the fingerprint.
- 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 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 | BiometricPrompt: a 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. |
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 lockout: 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. Ask the developers; it changes what “log out everywhere” and “change password” should do to biometric login.
Example requirements
What usually goes wrong
| # | Bug | What you see | Typical severity |
|---|---|---|---|
| 1 | New biometric still unlocks | A newly added finger or face opens the app without the password | Critical (security) |
| 2 | Cancel logs in | Tapping Cancel on the sheet unlocks the app | Critical (security) |
| 3 | No fallback after lockout | “Face ID is locked” with no way to use the password | High |
| 4 | Turned on without asking | Biometric login is on after the first login, no opt-in | Medium–High |
| 5 | Dead button | Biometrics off in Settings, but “Use Face ID” is shown and does nothing | Medium |
| 6 | Data behind the prompt | Balance readable behind the lock screen or in the app switcher | High (privacy) |
| 7 | Crash without hardware | App crashes on an emulator or old phone without a sensor | High |
| 8 | Missing Face ID description | Works with Touch ID, fails on every Face ID iPhone | High |
| 9 | Still on after logout | Another user logs in and the previous user’s biometric login unlocks the account | Critical |
| 10 | Password change ignored | Biometric login still works with a token the server should have revoked | High (security) |
| 11 | Prompt loop | The biometric sheet opens again right after Cancel, so the user can’t reach the fallback | Medium |
| 12 | Weak biometrics accepted | A Class 2 face unlock opens a banking app that requires Class 3 | High (security) |
Find the bug
Kestrel Bank’s Face ID unlock below has six bugs. Next to the phone you control the device like the iOS Simulator does: enroll Face ID or remove it, scan a matching or non-matching face, add an alternate appearance in Settings, switch Face ID off for the app, and lock the phone. A device log shows what the app asks the OS and what it gets back.
- Log in with the password and look around. What did the app decide for you?
- Lock the phone, unlock it, and watch the screen while the Face ID sheet is open.
- Try Cancel, a non-matching face (many times), and a new appearance.
- Switch Face ID off (or remove it) and try to unlock.
🐞 Bug hunt: Kestrel Bank Face ID unlock
This demo has 6 hidden bugs. Explore it like a tester, then check your findings.
Kestrel Bank
The password is already filled in.
Simulator · Features › Face ID
Scan buttons work while the Face ID sheet is open.
Settings › Face ID & Passcode
From the spec
- After the first password login, ask “Use Face ID next time?”. Turn it on only if the user agrees.
- When the app opens again, nothing from the account is visible until it's unlocked.
- Canceling Face ID keeps the app locked.
- “Use password” is always available, also after Face ID locks.
- If Face ID is off, not set up or not allowed, say so and show the password login.
- If the device's Face ID data changes, turn Face ID login off and ask for the password.
Device log
- Log in, then lock the phone…
- 1
Hint: Use Settings › Set up an alternate appearance, lock the phone, then scan the new face.
- 2
Hint: Scan a non-matching face five times.
- 3
Hint: Log in with the password, then look at the Security section.
- 4
Hint: Lock and unlock the phone, then tap Cancel on the Face ID sheet.
- 5
Hint: Turn off Enrolled, or switch Face ID off for Kestrel in Settings, then lock the phone and tap the button.
- 6
Hint: Lock the phone, unlock it, and look at what is behind the Face ID sheet.
Test scenarios
Functional
- Opt-in: after the first password login, the app asks; “Not now” leaves it off; “Yes” asks for one scan and turns it on.
- Unlock: a matching face or finger unlocks; the account appears with the right user’s data.
- Turn off biometric login in the app’s settings; the next unlock asks for the password.
- Logout turns biometric login off; another user logging in on the same phone is asked to opt in again.
- Re-lock: the app locks again after the agreed time in the background, and after a phone restart.
- Fallback: “Use password” works from the unlock screen, after failures and after a lockout.
Negative
- Non-matching face or finger: rejected, the app stays locked.
- Cancel, swipe the sheet away, press the Home/Back gesture during the scan: the app stays locked.
- Lockout: 5 failed scans (iOS) or repeated failures (Android): the fallback appears, never a dead end.
- Not allowed: tap “Don’t Allow” on the iOS Face ID prompt; switch it off later in Settings.
- Not enrolled / no hardware: remove all faces or fingerprints; use a device or emulator without a sensor. No crash, no dead button.
Edge cases
- Biometrics changed: add a new finger or an alternate appearance; remove one. The app must ask for the password (for sensitive apps).
- Password changed on another device, or “log out of all devices”: biometric login on this phone must stop working.
- Interruptions during the scan: a phone call, a notification, locking the phone. See Interruptions.
- App update and reinstall: is biometric login kept after an update? After a reinstall, iOS Keychain items may survive (see Install, Update, Uninstall); the app must not unlock with a leftover token without the user opting in again.
- Device passcode removed: on both platforms, removing the screen lock removes biometrics. The app must notice.
- Two accounts on one phone (personal and business): biometrics unlock the right one.
UI & usability
- The opt-in explains the benefit in plain words and uses the right name: Face ID, Touch ID or fingerprint / face unlock, matching the device.
- The unlock screen shows one clear action and an always-visible “Use password”.
- Error messages say what happened and what to do (“Face ID is locked. Use your password.”).
- The sheet is not shown again in a loop right after Cancel.
Security
- Cancel, failure and lockout never unlock the app.
- A new biometric doesn’t unlock without the password (if the requirements say so).
- Nothing sensitive is visible behind the prompt or in the app switcher.
- Logout, password change and “log out everywhere” disable biometric login.
- Sensitive actions (adding a payee, changing the phone number) may still need the password even after biometric unlock. Check the requirements.
Accessibility
- Users who can’t use biometrics (no fingerprints, face covered, motor impairments) can always use the password or passcode.
- The unlock screen and errors work with a screen readerScreen readerSoftware that reads the screen aloud for blind and low-vision users, like VoiceOver or TalkBack.Open in glossary → (VoiceOver, TalkBack). iOS also offers Face ID without “attention” (eyes open, looking at the screen) as an accessibility setting; the app should work with it.
- Large text doesn’t hide the “Use password” button.
How to test biometrics on simulators, emulators and real devices
You don’t need ten faces to test this. Both platforms let you fake scans. The general setup is in Simulators and Emulators.
- Pick a Face ID model (any recent iPhone) or a Touch ID model (iPhone SE) in Xcode.
- Enroll: in the Simulator menu choose Features › Face ID › Enrolled. Untick it to test “not enrolled”.
- Trigger the sheet in the app, then choose Features › Face ID › Matching Face for a success or Non-matching Face for a failure. Repeat Non-matching to reach the lockout.
- Reset the Face ID permission: delete the app and install it again, so the “Allow to use Face ID?” prompt appears again.
Limits: the Simulator can’t simulate an “alternate appearance” or a newly added finger. Test biometric changes on a real device.
- Set a screen lock first: in the emulator’s Settings › Security, add a PIN. Biometrics require it.
- Enroll a fingerprint: Settings › Security › Fingerprint (the name varies by Android version). When it asks you to touch the sensor, open Extended controls (⋮) › Fingerprint and click Touch the sensor a few times.
- Scan in the app: with BiometricPrompt open, touch the sensor with the enrolled finger (success) or choose a different finger (failure).
- From the command line:
adb -e emu finger touch 1touches the sensor with finger 1. Use another number for a non-enrolled finger. See ADB basics.
Limits: the emulator only simulates fingerprints. Face unlock and Class 2 vs Class 3 behavior need real devices.
- Cover both kinds: at least one Face ID iPhone, one Touch ID device, a Pixel with fingerprint, and a Samsung (different biometric UI and settings).
- Change biometrics for real: add a fingerprint, set up an alternate appearance, remove all biometrics, remove the screen lock.
- Real-life failures: wet or gloved fingers, sunglasses, low light, holding the phone flat on a table.
- Lock and reopen the app many times: background, phone lock, restart, app switcher.
- Use test accounts only, never your personal bank. And never test with someone else’s face or finger without asking.
Example test cases
TC-BIO-001Opt in to Face ID after the first loginpositivehigh
Preconditions
- Face ID is enrolled on the device
- Fresh install, user logged out
Steps
- Log in with email and password
- Answer "Use Face ID to log in next time?" with Yes
- Allow Face ID in the system prompt and scan a matching face
Expected result
Biometric login is on. After locking and reopening the app, a matching face unlocks it.
TC-BIO-002Biometric login stays off without opt-innegativehigh
Steps
- Log in with the password on a fresh install
- Answer the opt-in question with "Not now"
- Lock and reopen the app
Expected result
The app asks for the password. No biometric sheet is shown and the setting is off.
TC-BIO-003Cancel keeps the app lockednegativehigh
Preconditions
- Biometric login is on
Steps
- Lock and reopen the app
- Tap Cancel on the Face ID sheet
Expected result
The app stays locked. The unlock screen shows "Unlock with Face ID" and "Use password". No account data is visible.
TC-BIO-004Fallback after biometric lockoutnegativehigh
Preconditions
- Biometric login is on
- iOS Simulator with Face ID enrolled
Steps
- Reopen the app
- Choose Non-matching Face 5 times
Expected result
The app says Face ID is locked and offers "Use password". Logging in with the password works.
TC-BIO-005New fingerprint requires the passwordedgehigh
Preconditions
- Real Android device with one enrolled fingerprint
- Biometric login is on
Steps
- In Settings, enroll a second fingerprint
- Open the app
- Touch the sensor with the new finger
Expected result
The app explains that biometrics changed and asks for the password. The new finger does not unlock it.
TC-BIO-006Face ID not allowed for the appnegativemedium
Preconditions
- Biometric login is on
Steps
- Settings › Face ID & Passcode › Other Apps: switch the app off
- Reopen the app
Expected result
No Face ID sheet and no dead button. The app explains that Face ID is off for it and shows password login.
TC-BIO-007No account data before unlockedgehigh
Preconditions
- Biometric login is on
- Home screen shows the balance
Steps
- Send the app to the background and open the app switcher
- Lock the phone, unlock it and open the app
Expected result
The app switcher shows a covered or blurred screen. While the biometric sheet is shown, the balance is not visible.
TC-BIO-008No biometric hardwareedgemedium
Preconditions
- Android emulator or device without a fingerprint sensor
Steps
- Install the app and log in with the password
- Open the app settings
Expected result
No opt-in question and no biometric option. No crash.
Tip: click a test case to expand it.
iOS vs Android vs web
- Face ID needs a permission. The first use shows “Allow “App” to use Face ID?”. Test both answers and the per-app switch in Settings › Face ID & Passcode › Other Apps. Touch ID has no such prompt.
- Usage description: check on a Face ID device that the prompt text is present and sensible. A missing description is a release blocker.
- Fallback button: the iOS sheet can show the app’s own fallback (for example “Enter Password”) after a failed scan. Check it’s there and leads somewhere useful.
- Keychain survives reinstall: delete and reinstall the app, then check whether biometric login unexpectedly still works.
- BiometricPrompt looks different on Pixel, Samsung and others, and can show fingerprint, face or both. Test on several makers (Device Fragmentation).
- Classes: know whether the app accepts Class 2 (weak) biometrics, Class 3 only, or also the device PIN. Test a phone with Class 2 face unlock.
- In-display fingerprint sensors sit under the screen; check the app doesn’t cover the sensor area with its own UI.
- No screen lock = no biometrics. Remove the PIN and check the app handles it.
- Websites can’t use Face ID directly. They use passkeys (WebAuthn): the browser asks the OS to verify the user with biometrics or the device PIN, and the site gets a cryptographic signature, never the biometric.
- Test passkey sign-in and the fallback (password or another device), and what happens when the user cancels the browser’s passkey dialog.
- The same principles apply: cancel never signs in, a fallback always exists, and nothing sensitive leaks before authentication.
Checklist
Biometric login checklist
0 of 13 checked
Check your understanding
Quick quiz
0/6 answered · 0 correct
1.What does the banking server receive when you unlock the app with Face ID?
2.On the Face ID sheet you tap Cancel and the app opens your account. How do you report it?
3.A tester adds a second fingerprint to the test phone. For a banking app, what is the expected result next time?
4.How do you test a non-matching face on the iOS Simulator?
5.Fingerprint login works on an Android phone, but face unlock is never offered by the banking app. What should you check first?
6.After five failed scans the app shows "Face ID is locked. Try again later." and nothing else. What is wrong?
Key takeaways
- Biometrics are checked on the phone. A match releases a stored token or key; the server never sees a face or fingerprint.
- Biometric login is opt-in after a password login, and the password (or passcode) fallback must always be reachable.
- Cancel, failure, lockout and errors must leave the app locked, and nothing sensitive may show behind the prompt or in the app switcher.
- When the phone’s biometrics change, sensitive apps must ask for the password again.
- Use the Simulator (Features › Face ID) and Emulator (Fingerprint,
adb -e emu finger touch 1) for fast checks, and real devices for biometric changes, face unlock and Android classes.
Finished this page?Nice work, this page is complete!
Mark it as done to track your progress. It's saved in this browser, no account needed.
Its review cards are now in Bites ⚡