Skip to main content
Version: 3.x

Taro.checkIsSoterEnrolledInDevice(option)

Checks whether biometric information, such as fingerprints, is enrolled in the device.

Reference

Type​

(option: Option) => Promise<SuccessCallbackResult>

Parameters​

Option​

PropertyTypeRequiredDescription
checkAuthMode"fingerPrint" | "facial" | "speech"YesAuthentication method
complete(res: any) => voidNoThe callback function used when the API call completed (always executed whether the call succeeds or fails)
fail(res: any) => voidNoThe callback function for a failed API call
success(res: Result) => voidNoThe callback function for a successful API call

requestAuthModes​

PropertyDescription
fingerPrintFingerprint recognition
facialFace recognition
speechVoiceprint recognition (not supported)

API Support​

APIWeChat Mini-ProgramH5React Native
requestAuthModes.speech

SuccessCallbackResult​

PropertyTypeDescription
errMsgstringError message
isEnrolledbooleanIndicates whether the information is enrolled

Sample Code​

Taro.checkIsSoterEnrolledInDevice({
checkAuthMode: 'fingerPrint',
success: function (res) {
console.log(res.isEnrolled)
}
})

API Support​

APIWeChat Mini-ProgramH5React Native
Taro.checkIsSoterEnrolledInDevice✔️