Error codes
AuthenticationError is a string union of 15 values. It is set on AuthenticationResult.error exactly when success is false.
| Code | Meaning | iOS source (LAError) | Android source |
|---|---|---|---|
not_available | The device has no biometric hardware, or the app may not use it. | biometryNotAvailable; missing NSFaceIDUsageDescription | BIOMETRIC_ERROR_HW_UNAVAILABLE, HW_NOT_PRESENT, SECURITY_UPDATE_REQUIRED; missing USE_BIOMETRIC; biometrics only on Android 8 and 9 |
not_enrolled | No biometrics are enrolled, and the device fallback is disabled or unavailable. | biometryNotEnrolled | BIOMETRIC_ERROR_NO_BIOMETRICS, BIOMETRIC_ERROR_NONE_ENROLLED |
passcode_not_set | The device has no passcode, PIN, pattern or password. | passcodeNotSet | BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL; keyguard fallback on an insecure device |
lockout | Too many failed attempts locked biometrics. | biometryLockout | BIOMETRIC_ERROR_LOCKOUT, BIOMETRIC_ERROR_LOCKOUT_PERMANENT |
user_cancel | The user dismissed the prompt. | userCancel | BIOMETRIC_ERROR_USER_CANCELED, BIOMETRIC_ERROR_NEGATIVE_BUTTON; keyguard screen left |
system_cancel | The system dismissed the prompt, for example when the app moved to the background. | systemCancel | BIOMETRIC_ERROR_CANCELED |
app_cancel | The app called cancelAuthenticate, or a newer authenticate call replaced the prompt. | appCancel | Any failure after cancelAuthenticate |
user_fallback | The user tapped the fallback button on iOS. | userFallback | n/a |
authentication_failed | The user did not match. | authenticationFailed | n/a: a failed match keeps the prompt open |
timeout | The prompt timed out on Android. | n/a | BIOMETRIC_ERROR_TIMEOUT |
no_space | Android has no storage left to finish authentication. | n/a | BIOMETRIC_ERROR_NO_SPACE |
unable_to_process | The sensor could not read the biometric, for example a dirty sensor. | n/a | BIOMETRIC_ERROR_UNABLE_TO_PROCESS |
invalid_context | The authentication context was invalidated on iOS. | invalidContext | n/a |
not_interactive | The app may not show the prompt, for example while it is in the background. | notInteractive | n/a |
unknown | Any other platform error. The warning field describes it. | Any other code | Any other code |
warning carries the platform's message for logs only. See Handling errors for grouping the codes in app logic.