@tauri-apps/plugin-biometric
FaceID: 2;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L12
Iris: 3;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L14
None: 0;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L8
TouchID: 1;
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L10
属性 | 类型 | 定义于 |
---|---|---|
allowDeviceCredential? | 布尔值 (boolean) | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L36 |
cancelTitle? | 字符串 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L37 |
confirmationRequired? | 布尔值 (boolean) | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L45 |
fallbackTitle? | 字符串 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L40 |
maxAttemps? | 数字 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L46 |
subtitle? | 字符串 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L44 |
title? | 字符串 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L43 |
属性 | 类型 | 定义于 |
---|---|---|
biometryType | 生物识别类型 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L19 |
error? | 字符串 | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L20 |
errorCode? | | "appCancel" | "authenticationFailed" | "invalidContext" | "notInteractive" | "passcodeNotSet" | "systemCancel" | "userCancel" | "userFallback" | "biometryLockout" | "biometryNotAvailable" | "biometryNotEnrolled" | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L21 |
isAvailable | 布尔值 (boolean) | 来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L18 |
function authenticate(reason, options?): Promise<void>
使用系统界面(触控ID、面容ID或安卓虹膜)提示用户进行身份验证。如果身份验证失败,则拒绝。
import { authenticate } from "@tauri-apps/plugin-biometric";await authenticate('Open your wallet');
参数 | 类型 | 描述 |
---|---|---|
原因 | 字符串 | |
选项 ? | 身份验证选项 |
Promise
<void
>
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L69
function checkStatus(): Promise<Status>
检查生物识别认证是否可用。
一个Promise,它解析为一个对象,其中包含有关生物识别状态的所有信息。
来源: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L53
© 2025 Tauri 贡献者。CC-BY / MIT