title: Taro.checkIsSupportSoterAuthentication(option)

sidebar_label: checkIsSupportSoterAuthentication

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

支持情况:checkIsSupportSoterAuthentication - 图1 checkIsSupportSoterAuthentication - 图2 checkIsSupportSoterAuthentication - 图3

参考文档

类型

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

参数

参数 类型
option Option

Option

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

SuccessCallbackResult

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

requestAuthModes

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

示例代码

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