@tauri-apps/plugin-biometric
Prompt the user for biometric authentication on Android and iOS.
Enumerations
Section titled “Enumerations”BiometryType
Section titled “BiometryType”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L16
The kind of biometry hardware detected on the device.
Enumeration Members
Section titled “Enumeration Members”FaceID
Section titled “FaceID”FaceID: 2;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L22
Apple FaceID or Android face authentication.
Iris: 3;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L24
Android iris authentication.
None: 0;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L18
No biometry hardware is available, or it is not enrolled with the operating system.
TouchID
Section titled “TouchID”TouchID: 1;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L20
Apple TouchID or Android fingerprint.
Interfaces
Section titled “Interfaces”AuthOptions
Section titled “AuthOptions”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L56
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. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L58 |
cancelTitle? |
string |
Label for the cancel button. Available on both Android and iOS. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L60 |
confirmationRequired? |
boolean |
Whether additional user confirmation is required, such as pressing a button, after successful biometric authentication. Android only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L72 |
fallbackTitle? |
string |
Text displayed on the fallback button if biometric authentication fails. iOS only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L64 |
maxAttemps? |
number |
Maximum number of attempts allowed before the prompt is dismissed. Defaults to 3. Android only. |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L74 |
subtitle? |
string |
Subtitle providing contextual information of the biometric verification. Android only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L70 |
title? |
string |
Title indicating the purpose of the biometric verification. Android only. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L68 |
Status
Section titled “Status”Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L31
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. |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L35 |
error? |
string |
A human-readable reason why biometric authentication is unavailable. Only set when isAvailable is false. |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L37 |
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. |
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L39 |
isAvailable |
boolean |
Whether the device can currently authenticate using biometrics. | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L33 |
Functions
Section titled “Functions”authenticate()
Section titled “authenticate()”function authenticate(reason, options?): Promise<void>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L109
Prompts the user for authentication using the system interface (touchID, faceID or Android Iris). Rejects if the authentication fails.
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”Promise<void>
a promise resolving to void once the user is successfully authenticated.
Example
Section titled “Example”import { authenticate } from "@tauri-apps/plugin-biometric";await authenticate('Open your wallet');2.0.0
checkStatus()
Section titled “checkStatus()”function checkStatus(): Promise<Status>;Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L91
Checks if the biometric authentication is available.
Returns
Section titled “Returns”a promise resolving to an object containing all the information about the status of the biometry.
Example
Section titled “Example”import { checkStatus } from '@tauri-apps/plugin-biometric';
const status = await checkStatus();if (status.isAvailable) { // do something}2.0.0
© 2026 Tauri Contributors. CC-BY / MIT