This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Expo LocalAuthentication iconExpo LocalAuthentication

A library that provides functionality for implementing the Fingerprint API (Android) or FaceID and TouchID (iOS) to authenticate the user with a face or fingerprint scan.

Android
iOS
Included in Expo Go
Recommended version:
~56.0.5

expo-local-authentication allows you to use the Biometric Prompt (Android) or FaceID and TouchID (iOS) to authenticate the user with a fingerprint or face scan.

Known limitation

iOS 
iOS

The FaceID authentication for iOS is not supported in Expo Go. You will need to create a development build to test FaceID.

Installation

Terminal
- npx expo install expo-local-authentication
- yarn expo install expo-local-authentication
- pnpm expo install expo-local-authentication
- bun expo install expo-local-authentication

If you are installing this in an existing React Native app, make sure to install expo in your project.

Configuration in app config

You can configure expo-local-authentication using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.

Example app.json with config plugin

app.json
{ "expo": { "plugins": [ [ "expo-local-authentication", { "faceIDPermission": "Allow $(PRODUCT_NAME) to use Face ID." } ] ] } }

Configurable properties

NameDefaultDescription
faceIDPermission"Allow $(PRODUCT_NAME) to use Face ID"
Only for: 
iOS

A string to set the NSFaceIDUsageDescription permission message.

Are you using this library in an existing React Native app?

If you're not using Continuous Native Generation (CNG) or you're using a native ios project manually, then you need to add NSFaceIDUsageDescription key to your ios/[app]/Info.plist:

Info.plist
<key>NSFaceIDUsageDescription</key> <string>Allow $(PRODUCT_NAME) to use FaceID</string>

API

import * as LocalAuthentication from 'expo-local-authentication';

No API data file found, sorry!

Permissions

Android

The following permissions are added automatically through this library's AndroidManifest.xml:

Android permissionDescription

USE_BIOMETRIC

Allows an app to use device supported biometric modalities.

USE_FINGERPRINT

iOS

The following usage description keys are used by this library:

Info.plist keyDescription

NSFaceIDUsageDescription

A message that tells the user why the app is requesting the ability to authenticate with Face ID.