Skip to content
Tauri

@tauri-apps/plugin-biometric

Enumerations

BiometryType

Enumeration Members

FaceID
FaceID: 2;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L12

Iris
Iris: 3;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L14

None
None: 0;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L8

TouchID
TouchID: 1;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L10

Interfaces

AuthOptions

Properties

PropertyType
allowDeviceCredential?boolean
cancelTitle?string
confirmationRequired?boolean
fallbackTitle?string
maxAttemps?number
subtitle?string
title?string

Status

Properties

PropertyType
biometryTypeBiometryType
error?string
errorCode?| "appCancel" | "authenticationFailed" | "invalidContext" | "notInteractive" | "passcodeNotSet" | "systemCancel" | "userCancel" | "userFallback" | "biometryLockout" | "biometryNotAvailable" | "biometryNotEnrolled"
isAvailableboolean

Functions

authenticate()

function authenticate(reason, options?): Promise<void>

Prompts the user for authentication using the system interface (touchID, faceID or Android Iris). Rejects if the authentication fails.

import { authenticate } from "@tauri-apps/plugin-biometric";
await authenticate('Open your wallet');

Parameters

ParameterTypeDescription
reasonstring
options?AuthOptions

Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L69


checkStatus()

function checkStatus(): Promise<Status>

Checks if the biometric authentication is available.

Returns

Promise<Status>

a promise resolving to an object containing all the information about the status of the biometry.

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L53


© 2024 Tauri Contributors. CC-BY / MIT