Skip to main content

Platform differences

Frameworks​

iOSAndroid
FrameworkLocalAuthentication (LAContext)android.hardware.biometrics BiometricManager and BiometricPrompt
DeclarationNSFaceIDUsageDescription (Face ID only)USE_BIOMETRIC permission
Biometric typesfingerprint (Touch ID), facial_recognition (Face ID), optic_id (iOS 17+)fingerprint, facial_recognition, iris
Biometric classesAlways strongClass 2 (weak) or Class 3 (strong)
Lockout queryLive from LAContextThe latest prompt in this process
Prompt titleSystem title; promptMessage is the reasonpromptMessage, or the app name

Android versions​

AndroidBiometricsDevice credential fallback
11+BiometricPrompt with setAllowedAuthenticators, honouring the class.In the same prompt.
10BiometricPrompt; biometricsSecurityLevel is not enforced.In the same prompt, or the keyguard screen without biometrics.
8 and 9Not available: isEnrolled is false, authenticate without fallback resolves with not_available.The keyguard's confirm-credential screen.

On the keyguard screen, promptMessage is the title and promptDescription the description. Leaving the screen without confirming resolves with user_cancel. cancelAuthenticate cannot close it; the promise resolves with app_cancel at once and the screen's result is ignored.

Options by platform​

OptioniOSAndroid
promptMessageThe reason under the title. Defaults to "Authenticate".The title. Defaults to the app name.
promptSubtitleIgnored.The subtitle.
promptDescriptionIgnored.The description.
cancelLabelThe cancel button.The cancel button when disableDeviceFallback is set. Defaults to "Cancel".
disableDeviceFallbackUses deviceOwnerAuthenticationWithBiometrics instead of deviceOwnerAuthentication.Allows only biometrics instead of biometrics or DEVICE_CREDENTIAL.
requireConfirmationIgnored.Whether a passive match, such as face unlock, needs a tap. Defaults to true.
biometricsSecurityLevelIgnored. iOS biometrics are always strong.weak (default) allows Class 2 biometrics, strong only Class 3.
fallbackLabelThe fallback button after a failed attempt. '' hides it, and it is hidden by default with disableDeviceFallback.Ignored.

Platform-only error codes​

CodePlatform
user_fallback, invalid_context, not_interactiveiOS
timeout, no_space, unable_to_processAndroid

See Error codes for the native source of each.