@tauri-apps/plugin-biometric
Enumerations
BiometryType
Enumeration Members
FaceID
FaceID: 2;Source: index.ts:12
Iris
Iris: 3;Source: index.ts:14
None
None: 0;Source: index.ts:8
TouchID
TouchID: 1;Source: index.ts:10
Interfaces
AuthOptions
Properties
| Property | Type |
|---|---|
allowDeviceCredential? | boolean |
cancelTitle? | string |
confirmationRequired? | boolean |
fallbackTitle? | string |
maxAttemps? | number |
subtitle? | string |
title? | string |
Status
Properties
| Property | Type |
|---|---|
biometryType | BiometryType |
error? | string |
errorCode? | "appCancel" | "authenticationFailed" | "invalidContext" | "notInteractive" | "passcodeNotSet" | "systemCancel" | "userCancel" | "userFallback" | "biometryLockout" | "biometryNotAvailable" | "biometryNotEnrolled" |
isAvailable | boolean |
Functions
authenticate()
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
| Parameter | Type | Description |
|---|---|---|
reason | string | |
options? | AuthOptions |
Returns
Promise< void >
Source: index.ts:69
checkStatus()
checkStatus(): Promise< Status >Checks if the biometric authentication is available.
Returns
a promise resolving to an object containing all the information about the status of the biometry.
Source: index.ts:53
© 2024 Tauri Contributors. CC-BY / MIT