@tauri-apps/plugin-biometric
Prompt the user for biometric authentication on Android and iOS.
Functions
Section titled “Functions”authenticate()
Section titled “authenticate()”function authenticate(reason: string, options?: AuthOptions): Promise<void>;Defined in: plugins/biometric/guest-js/index.ts:109
Prompts the user for authentication using the system interface (touchID, faceID or Android Iris). Rejects if the authentication fails.
Example
Section titled “Example”import { authenticate } from "@tauri-apps/plugin-biometric";await authenticate('Open your wallet');Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
reason |
string |
A message shown to the user explaining why authentication is requested. |
options? |
AuthOptions |
Configuration for the biometric prompt. |
Returns
Section titled “Returns”a promise resolving to void once the user is successfully authenticated.
2.0.0
checkStatus()
Section titled “checkStatus()”function checkStatus(): Promise<Status>;Defined in: plugins/biometric/guest-js/index.ts:91
Checks if the biometric authentication is available.
Example
Section titled “Example”import { checkStatus } from '@tauri-apps/plugin-biometric';
const status = await checkStatus();if (status.isAvailable) { // do something}Returns
Section titled “Returns”a promise resolving to an object containing all the information about the status of the biometry.
2.0.0
Enumerations
Section titled “Enumerations”BiometryType
Section titled “BiometryType”Defined in: plugins/biometric/guest-js/index.ts:16
The kind of biometry hardware detected on the device.
Enumeration Members
Section titled “Enumeration Members”| Enumeration Member | Value | Description | Defined in |
|---|---|---|---|
FaceID |
2 |
Apple FaceID or Android face authentication. | plugins/biometric/guest-js/index.ts:22 |
Iris |
3 |
Android iris authentication. | plugins/biometric/guest-js/index.ts:24 |
None |
0 |
No biometry hardware is available, or it is not enrolled with the operating system. | plugins/biometric/guest-js/index.ts:18 |
TouchID |
1 |
Apple TouchID or Android fingerprint. | plugins/biometric/guest-js/index.ts:20 |
Interfaces
Section titled “Interfaces”AuthOptions
Section titled “AuthOptions”Defined in: plugins/biometric/guest-js/index.ts:56
Options for the authenticate biometric prompt.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
allowDeviceCredential? |
boolean |
Enables authentication using the device’s password or PIN. Available on both Android and iOS. | plugins/biometric/guest-js/index.ts:58 |
cancelTitle? |
string |
Label for the cancel button. Available on both Android and iOS. | plugins/biometric/guest-js/index.ts:60 |
confirmationRequired? |
boolean |
Whether additional user confirmation is required, such as pressing a button, after successful biometric authentication. Android only. | plugins/biometric/guest-js/index.ts:72 |
fallbackTitle? |
string |
Text displayed on the fallback button if biometric authentication fails. iOS only. | plugins/biometric/guest-js/index.ts:64 |
maxAttemps? |
number |
Maximum number of attempts allowed before the prompt is dismissed. Defaults to 3. Android only. |
plugins/biometric/guest-js/index.ts:74 |
subtitle? |
string |
Subtitle providing contextual information of the biometric verification. Android only. | plugins/biometric/guest-js/index.ts:70 |
title? |
string |
Title indicating the purpose of the biometric verification. Android only. | plugins/biometric/guest-js/index.ts:68 |
Status
Section titled “Status”Defined in: plugins/biometric/guest-js/index.ts:31
The result of checkStatus, describing whether biometric authentication can
currently be used.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
biometryType |
BiometryType |
The kind of biometry hardware detected on the device, even when isAvailable is false. |
plugins/biometric/guest-js/index.ts:35 |
error? |
string |
A human-readable reason why biometric authentication is unavailable. Only set when isAvailable is false. |
plugins/biometric/guest-js/index.ts:37 |
errorCode? |
| "appCancel" | "authenticationFailed" | "invalidContext" | "notInteractive" | "passcodeNotSet" | "systemCancel" | "userCancel" | "userFallback" | "biometryLockout" | "biometryNotAvailable" | "biometryNotEnrolled" |
A platform-specific error code describing why biometric authentication is unavailable. Only set when isAvailable is false. |
plugins/biometric/guest-js/index.ts:39 |
isAvailable |
boolean |
Whether the device can currently authenticate using biometrics. | plugins/biometric/guest-js/index.ts:33 |
© 2026 Tauri Contributors. CC-BY / MIT