Skip to main content
v0.1.0For NitroUI 0.3, on Nitro 1.0

Biometric unlock,
the native way.

Face ID, Touch ID, fingerprint and device passcode for NitroUI apps. The expo-local-authentication API, calling LocalAuthentication on iOS and BiometricPrompt on Android directly.

$bun add nitro-local-auth

Both platforms, one module

A Swift and a Kotlin implementation behind one TypeScript spec.

Built for real prompts

The edge cases of the system prompt, handled in native code.

One call to unlock

Check the status synchronously, await the prompt, switch on a typed error.

Read the guides
import { LocalAuthentication } from 'nitro-local-auth'

if (LocalAuthentication.hasHardware() && LocalAuthentication.isEnrolled()) {
const result = await LocalAuthentication.authenticate({
promptMessage: 'Unlock your account',
cancelLabel: 'Not now',
})
if (result.success) {
// Unlocked.
}
}
7
Static methods
15
Typed error codes
4
Biometric types
6
Exported types

Add biometric unlock today

Install the package, add one Info.plist key and one permission, and open the prompt.

Start the setup