Skip to main content
Version: 下个版本

Taro.checkIsSupportSoterAuthentication(option)

获取本机支持的 SOTER 生物认证方式

支持情况:

参考文档

类型

(option?: Option) => Promise<SuccessCallbackResult>

参数

参数类型
optionOption

Option

参数类型必填说明
complete(res: TaroGeneral.CallbackResult) => void接口调用结束的回调函数(调用成功、失败都会执行)
fail(res: TaroGeneral.CallbackResult) => void接口调用失败的回调函数
success(result: SuccessCallbackResult) => void接口调用成功的回调函数

SuccessCallbackResult

参数类型说明
supportMode(keyof requestAuthModes)[]该设备支持的可被SOTER识别的生物识别方式
errMsgstring调用信息

requestAuthModes

参数说明
fingerPrint指纹识别
facial人脸识别
speech声纹识别
API 支持度: 暂未支持

示例代码

Taro.checkIsSupportSoterAuthentication({
success: function (res) {
// res.supportMode = [] 不具备任何被SOTER支持的生物识别方式
// res.supportMode = ['fingerPrint'] 只支持指纹识别
// res.supportMode = ['fingerPrint', 'facial'] 支持指纹识别和人脸识别
}
})