Skip to content
Bugwise
Menu
Features & Flows

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.

40–60 min intermediate Mobile

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.

Part Not started

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

  1. 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).
  2. 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.
  3. 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”.
  4. 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 use BiometricPrompt (AndroidX Biometric library).
  5. 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

PlatformWhat the user seesWorth knowing
iPhone with Face IDA small Face ID sheet; a system prompt “Allow “App” to use Face ID?” the first timeThe 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”” sheetNo extra permission prompt. A missing Face ID description is invisible on Touch ID test phones, so it slips through.
AndroidA system bottom sheet for fingerprint, face or irisBiometrics 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
The Face ID usage description is the 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”, Android DEVICE_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:

SituationExampleWhat the app should do
No hardwareOlder Android phone, iPad without Touch IDNever show biometric options
Not enrolledUser never set up Face ID or fingerprintHide the option, or explain “Set up Face ID in Settings first”
Not allowediOS user tapped “Don’t Allow” on the Face ID prompt, or switched it off in Settings › Face ID & Passcode › Other AppsExplain it and show password login
Locked outToo many failed scansShow 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

  1. What does the banking server receive when you unlock the app with Face ID?

  2. A tester adds a second fingerprint to the test phone. For a banking app, what is the expected result next time?

  3. Fingerprint login works on an Android phone, but the banking app never offers face unlock. What should you check first?

The phone checks your face or finger locally and releases a stored token; the app needs fallbacks, lockout handling and a reaction to changed biometrics.

Part Not started

What usually goes wrong

#BugWhat you seeTypical severity
1New biometric still unlocksA newly added finger or face opens the app without the passwordCritical (security)
2Cancel logs inTapping Cancel on the sheet unlocks the appCritical (security)
3No fallback after lockout“Face ID is locked” with no way to use the passwordHigh
4Turned on without askingBiometric login is on after the first login, no opt-inMedium–High
5Dead buttonBiometrics off in Settings, but “Use Face ID” is shown and does nothingMedium
6Data behind the promptBalance readable behind the lock screen or in the app switcherHigh (privacy)
7Crash without hardwareApp crashes on an emulator or old phone without a sensorHigh
8Missing Face ID descriptionWorks with Touch ID, fails on every Face ID iPhoneHigh
9Still on after logoutAnother user logs in and the previous user’s biometric login unlocks the accountCritical
10Password change ignoredBiometric login still works with a token the server should have revokedHigh (security)
11Prompt loopThe biometric sheet opens again right after Cancel, so the user can’t reach the fallbackMedium
12Weak biometrics acceptedA Class 2 face unlock opens a banking app that requires Class 3High (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 SimulatorSimulatorSoftware that imitates a device's behavior on your computer, like Apple's iOS Simulator.Open in glossary → 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.

Found0/6
9:41

Kestrel Bank

maya@test.com
••••••••••

The password is already filled in.

Simulator · Features › Face ID

Enrolled

Scan buttons work while the Face ID sheet is open.

Settings › Face ID & Passcode

Other apps: KestrelNot asked yet

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. 1

    Hint: Use Settings › Set up an alternate appearance, lock the phone, then scan the new face.

  2. 2

    Hint: Scan a non-matching face five times.

  3. 3

    Hint: Log in with the password, then look at the Security section.

  4. 4

    Hint: Lock and unlock the phone, then tap Cancel on the Face ID sheet.

  5. 5

    Hint: Turn off Enrolled, or switch Face ID off for Kestrel in Settings, then lock the phone and tap the button.

  6. 6

    Hint: Lock the phone, unlock it, and look at what is behind the Face ID sheet.

Check this part

  1. On the Face ID sheet you tap Cancel and the app opens your account. How do you report it?

  2. Why is "a new biometric still unlocks" such a serious bug?

Typical biometric bugs, from Cancel logging in to new fingerprints that still unlock, then a buggy banking app to explore.

Part Not started

Test scenarios

Before you start, get these ready:

  • A test account (never your personal bank) and the requirements: which biometrics are accepted (on Android, which class), and what should happen when biometrics change.
  • For quick checks, the iOS Simulator or Android Emulator with a face or fingerprint enrolled. The next part of this lesson shows how to fake matching and non-matching scans there.
  • For biometric changes, face unlock and Android classes, a real test phone whose faces, fingerprints and screen lock you’re allowed to change.
  • A second account, for the logout and “another user” checks.

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

Edge cases

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

Check this part

  1. After five failed scans the app shows "Face ID is locked. Try again later." and nothing else. What is wrong?

  2. The user logs out. What should happen to biometric login?

Functional, negative, edge-case, usability, security and accessibility checks for biometric unlock and its fallbacks.

Part Not started

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.

  1. Pick a Face ID model (any recent iPhone) or a Touch ID model (iPhone SE) in Xcode.
  2. Enroll: in the Simulator menu choose Features › Face ID › Enrolled. Untick it to test “not enrolled”.
  3. 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.
  4. 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 deviceReal deviceA physical phone or tablet used for testing, as opposed to an emulator or simulator.Open in glossary →.

  1. Set a screen lock first: in the emulator’s Settings › Security, add a PIN. Biometrics require it.
  2. 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.
  3. Scan in the app: with the app’s biometric prompt open, touch the sensor with the enrolled finger (success) or choose a different finger (failure).
  4. From the command line: adb -e emu finger touch 1 touches 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.

Check this part

  1. How do you test a non-matching face on the iOS Simulator?

  2. What can the Android Emulator simulate?

Fake matching and non-matching scans on the iOS Simulator and Android Emulator, and use real devices for biometric changes and face unlock.

Part ProNot started

Example test cases

TC-BIO-001Opt in to Face ID after the first login

Preconditions

  • Face ID is enrolled on the device
  • Fresh install, user logged out

Steps

  1. Log in with email and password
  2. Answer "Use Face ID to log in next time?" with Yes
  3. 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-in

Steps

  1. Log in with the password on a fresh install
  2. Answer the opt-in question with "Not now"
  3. 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 locked

Preconditions

  • Biometric login is on

Steps

  1. Lock and reopen the app
  2. 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 lockout

Preconditions

  • Biometric login is on
  • iOS Simulator with Face ID enrolled

Steps

  1. Reopen the app
  2. 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 password

Preconditions

  • Real Android device with one enrolled fingerprint
  • Biometric login is on

Steps

  1. In Settings, enroll a second fingerprint
  2. Open the app
  3. 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 app

Preconditions

  • Biometric login is on

Steps

  1. Settings › Face ID & Passcode › Other Apps: switch the app off
  2. 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 unlock

Preconditions

  • Biometric login is on
  • Home screen shows the balance

Steps

  1. Send the app to the background and open the app switcher
  2. 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 hardware

Preconditions

  • Android emulator or device without a fingerprint sensor

Steps

  1. Install the app and log in with the password
  2. Open the app settings

Expected result

No opt-in question and no biometric option. No crash.

Tip: click a test case to expand it.

Check this part

  1. Expected result when the device has no biometric hardware?

  2. What should the app switcher show for the banking app?

Test cases: opt-in, cancel, lockout fallback, a new fingerprint, Face ID not allowed, hidden data and no hardware.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Part ProNot started

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.
  • The biometric prompt 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: a login key saved on the user’s devices (and often synced between them) instead of a password. The browser asks the OS to verify the user with biometrics or the device PIN, and the site gets a cryptographic signature (a one-time proof that only the saved passkey could produce), never the biometric.
    Dev note
    Passkeys are built on the WebAuthn standard (navigator.credentials.get() / .create()).
  • 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.

Check this part

  1. How do websites use biometrics?

  2. Which iOS check belongs on a Face ID device specifically?

Face ID needs a permission on iOS, Android has biometric classes and many prompt styles, and websites use passkeys.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Checklist

Biometric login checklist

0 of 13 checked

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 cards are now in your Bites review ⚡
Esc

Type to search the whole site.