How to Add Face ID to Your Expo App: Biometric Unlock with expo-local-authentication

DavidDavid October 9, 2026 8 min read

How to add Face ID to your Expo app, in short

You add Face ID to an Expo app with one package: expo-local-authentication. It wraps Face ID and Touch ID on iOS and the system biometric prompt on Android behind one JavaScript API. The setup is four steps: install the package, set the Face ID usage message in your app config, check that the device can actually do biometrics, and call authenticateAsync at the moment you want the user to prove it is them. The result tells you success or a specific error, and your app decides what to unlock.

The part most tutorials skip is the design around it. Face ID does not log anyone in. It confirms that the person holding the phone is the phone's owner. Your app still needs a real account and a stored session, and the biometric prompt only decides whether to hand that session back. Get that model right and the code is short. Get it wrong and you ship an app that locks people out the first time they change their face profile.

When Face ID is worth adding (and when it is not)

Biometric unlock earns its place in apps that hold something personal: a journal, a finance tracker, health notes, private messages, anything a user would not want a friend scrolling through after borrowing their phone. In those apps a Face ID lock is a feature people look for, and it makes returning to the app faster than typing a password.

It is not worth adding to a recipe app, a game or a habit tracker with nothing sensitive in it. An extra prompt on every open is friction, and friction on launch costs you daily opens. My rule: add it when a user would be embarrassed or harmed if someone else opened the app, and make it opt-in everywhere else.

Which approach fits which app

App typeRecommended approach
Journal, notes, health or finance dataOffer Face ID app lock, prompt on launch and when returning from background
Apps with a payment or destructive actionPrompt only before that action (confirm a transfer, delete an account)
General consumer appsOptional toggle in settings, off by default
Games, content and utility appsSkip it

Step 1: Install expo-local-authentication and set the usage message

Install the package with the Expo installer so you get the version that matches your SDK. Then register its config plugin in app.json or app.config.js. The plugin's faceIDPermission option sets NSFaceIDUsageDescription, the sentence iOS shows the first time your app asks for Face ID. Apple requires this description for any app that uses Face ID.

  1. Run: npx expo install expo-local-authentication
  2. In app.json, add to the plugins array: ["expo-local-authentication", { "faceIDPermission": "Allow $(PRODUCT_NAME) to use Face ID to unlock your journal." }]
  3. Write the message about the user's benefit. "Use Face ID to unlock your journal" tells the user why. "This app uses Face ID" does not.
  4. Rebuild the native app. The usage message is baked into the binary, so a JavaScript reload or an over-the-air update will not add it.

On Android the library adds the USE_BIOMETRIC permission for you through its own manifest, so there is nothing extra to configure there. If you are not using Continuous Native Generation and manage the ios folder yourself, add the NSFaceIDUsageDescription key to Info.plist by hand instead.

Step 2: Check what the device supports before you prompt

Never show a Face ID button without checking first. Plenty of devices have no biometric hardware, and plenty of users have hardware but never enrolled a face or fingerprint. expo-local-authentication gives you three checks for this.

  • hasHardwareAsync() returns true if the device has a face or fingerprint scanner.
  • isEnrolledAsync() returns true if the user has saved a face or fingerprint on the device.
  • supportedAuthenticationTypesAsync() returns an array of types: 1 for fingerprint, 2 for facial recognition, 3 for iris (Android only). Use it to label your button correctly: "Unlock with Face ID" on a Face ID iPhone, "Unlock with Touch ID" on one with a home button.

Only offer biometric unlock when both hasHardwareAsync and isEnrolledAsync are true. If the hardware exists but nothing is enrolled, you can hide the option or tell the user they can set up Face ID in their phone's settings to use it. Do not try to push them into the system settings from inside your onboarding; it is a detour most people will not come back from.

Step 3: Call authenticateAsync and handle every result

authenticateAsync shows the system prompt and resolves with an object. On success it is { success: true }. On failure it is { success: false, error } where error is a string such as user_cancel, system_cancel, lockout, not_enrolled, passcode_not_set or authentication_failed. Your code should branch on that error instead of treating every failure the same way.

The authenticateAsync options that matter for most apps (per Expo's LocalAuthentication reference)

OptionWhat it does
promptMessageText shown alongside the Face ID or Touch ID prompt
cancelLabelCustom label for the cancel button
fallbackLabel (iOS)Custom label for the Use Passcode button shown after failed attempts. An empty string hides it
disableDeviceFallbackStops the automatic fall back to the device passcode so you can handle it yourself. Defaults to false
biometricsSecurityLevel (Android)strong allows only Class 3 biometrics, weak also allows less secure Class 2 face unlock. Defaults to weak
  • success: unlock the app and load the stored session.
  • user_cancel or system_cancel: stay on the lock screen and show a button to try again. Do not sign the user out for cancelling.
  • lockout: biometrics are temporarily disabled after too many failed attempts. Offer the passcode or your own sign-in.
  • not_enrolled or passcode_not_set: the user removed their biometrics or passcode since enabling the feature. Turn biometric unlock off and send them to normal sign-in.

For most apps, leave disableDeviceFallback at its default. Letting iOS fall back to the device passcode means a user with a mask, gloves or a bad angle can still get in, and you write less code. Only disable it when your own fallback is a full sign-in with your backend, for example in a finance app where a shared family passcode is not good enough.

Step 4: Wire it into your auth flow the right way

The pattern that works: the user signs in normally once (email, Google, Sign in with Apple, whatever your [authentication setup](/blog/how-to-add-authentication-to-your-expo-app) uses). You store the session in expo-secure-store, which keeps it in the iOS Keychain and in Android Keystore-encrypted storage. Then you ask, once, whether they want to unlock with Face ID next time. If they say yes, save that preference. From then on, when the app opens or comes back from the background, show a lock screen and call authenticateAsync before you reveal anything.

  1. Ask for Face ID after the first successful sign-in, not on the first screen of onboarding. The user has a reason to say yes at that point.
  2. Store the preference (biometricsEnabled) separately from the token, so turning it off never deletes the session.
  3. Use AppState to re-lock when the app goes to the background, and decide how long it can sit before re-prompting. Re-prompting on every brief switch to another app gets annoying fast.
  4. Add a Face ID toggle in settings so the user can turn it off without reinstalling.
  5. Keep a visible "Sign in another way" link on the lock screen. That is your escape hatch for every edge case.

If you are on Supabase, the [Supabase with Expo](/blog/how-to-set-up-supabase-with-expo) guide already stores the session in SecureStore, so biometric unlock is a gate in front of that existing session, not a second auth system.

Face ID lock vs SecureStore requireAuthentication

There is a second way to use biometrics in Expo. expo-secure-store has a requireAuthentication option that ties a stored value to the device's biometrics at the operating system level. The value cannot be read without passing the biometric check, even by your own code. That is stronger than a lock screen in front of the app, but it comes with sharp edges you need to know before you choose it.

Two ways to use biometrics in an Expo app

LocalAuthentication gateSecureStore requireAuthentication
What it protectsThe app's UI: nothing shows until the prompt passesOne stored secret: it cannot be read without biometrics
When it promptsWhenever you call authenticateAsynciOS: when reading or updating an existing value, not when first creating it. Android: on every operation
If the user adds a fingerprint or changes their face profileKeeps workingThe stored value is invalidated and becomes unreadable
Works in Expo GoNot for Face ID on iOSNot when biometrics are available, due to the missing usage description
Best forMost apps: a privacy lock with a simple fallbackHigh-value secrets where you can recover by signing in again

My recommendation for an indie app is the LocalAuthentication gate. It covers what users actually expect from "Face ID lock" and it cannot strand them. If you do use requireAuthentication, treat the stored value as disposable: when a read returns null because the key was invalidated, send the user through normal sign-in and store a fresh token. The expo-secure-store plugin also has its own faceIDPermission option, so set the usage message there too.

How to test Face ID in an Expo app

Expo Go cannot test Face ID on iOS. You need a development build, which is the same reason covered in [Expo Go vs development build](/blog/expo-go-vs-development-build). Ask Claude Code to create one with EAS Build, install it on your phone, and test there.

  • iOS Simulator: in the Simulator's Features menu, enable Face ID enrollment, then use Matching Face and Non-matching Face to trigger success and failure while the prompt is showing. Good for testing your branches quickly.
  • Real device: required before you ship. Expo's SecureStore docs note that simulators do not require biometric authentication when retrieving protected secrets the way real iOS devices do, so simulator results can look fine when the device would behave differently.
  • Test the unhappy paths on purpose: cancel the prompt, fail it until fallback appears, turn off Face ID for your app in iOS Settings, and remove the device passcode. Each one should land the user somewhere sensible.
  • Ship it to [TestFlight](/blog/testflight-beta-testing-guide-for-expo-apps) testers before release. Different faces, glasses and lighting are the real test.

Have Claude Code build it for you

This is a feature Claude Code handles well because the API is small and the logic is mostly branching. Open your project in the Claude Code desktop app and give it the spec rather than a vague request. A prompt that works:

Put the rule "Face ID is an unlock, not a login" in your [CLAUDE.md](/blog/claude-md-for-expo-apps) so later sessions do not quietly turn it into the only way into the app. Then review the lock screen on a real device yourself; Claude Code can write every branch, but only you can tell whether re-locking after a quick app switch feels right.

The short version

To add Face ID to your Expo app: install expo-local-authentication, set faceIDPermission in its config plugin, check hasHardwareAsync and isEnrolledAsync before offering it, and call authenticateAsync in front of a session you already stored in expo-secure-store. Test in a development build on a real device, not Expo Go. Always leave a fallback and a settings toggle, because a biometric lock that can strand users is worse than none.

If you are building your first iOS app with Claude Code and Expo and want someone to check your auth flow before you submit, bring it to App Store Launch Club. Members share their builds for feedback, and the [curriculum](/curriculum) covers the full path from first build to first users. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

Does Face ID work in Expo Go?

No. Expo's LocalAuthentication docs list this as a known limitation on iOS: Face ID is not supported in Expo Go, and you need a development build to test it. The library itself ships in Expo Go, so Android biometrics and the API calls can be exercised there, but Face ID on iPhone needs a development build.

Why does my Expo app show the passcode screen instead of Face ID?

Most likely the NSFaceIDUsageDescription is missing from your build. Expo's docs say that on a Face ID iPhone without that key, authenticateAsync authenticates with the device passcode instead. Add the faceIDPermission option to the expo-local-authentication config plugin and rebuild the native app.

Does the same code work for Touch ID and Android fingerprint?

Yes. expo-local-authentication uses Face ID or Touch ID on iOS and the system biometric prompt on Android. Use supportedAuthenticationTypesAsync to find out which type the device has so your button label matches.

Can Face ID replace a password or sign-in in my app?

No. Face ID only confirms the device owner is present. Your app still needs a real account and a stored session. Use biometrics to unlock that stored session, and always keep a way to sign in without it.

Where should I store the login token when using Face ID?

In expo-secure-store, which uses the iOS Keychain and Android Keystore-encrypted storage. Keep the biometric preference as a separate value so turning Face ID off never deletes the session.

What happens if the user changes their Face ID after enabling it?

With a LocalAuthentication gate, nothing breaks: the next prompt uses the new face. With SecureStore requireAuthentication, Expo's docs say the system invalidates the stored value when biometrics change, so the read returns null and you need to send the user through sign-in again.

Do I need to rebuild the app to add Face ID?

Yes. The Face ID usage description and the native module are part of the app binary, so you need a new native build through EAS Build. An over-the-air update cannot add them.

Last reviewed by David on October 9, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog