Taro.checkIsSoterEnrolledInDevice(option)
Checks whether biometric information, such as fingerprints, is enrolled in the device.
Type
(option: Option) => Promise<SuccessCallbackResult>
Parameters
Option
| Property | Type | Required | Description | 
|---|---|---|---|
| checkAuthMode | "fingerPrint" | "facial" | "speech" | Yes | Authentication method | 
| complete | (res: any) => void | No | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 
| fail | (res: any) => void | No | The callback function for a failed API call | 
| success | (res: Result) => void | No | The callback function for a successful API call | 
requestAuthModes
| Property | Description | 
|---|---|
| fingerPrint | Fingerprint recognition | 
| facial | Face recognition | 
| speech | Voiceprint recognition (not supported) | 
API Support
| API | WeChat Mini-Program | H5 | React Native | 
|---|---|---|---|
| requestAuthModes.speech | 
SuccessCallbackResult
| Property | Type | Description | 
|---|---|---|
| errMsg | string | Error message | 
| isEnrolled | boolean | Indicates whether the information is enrolled | 
Sample Code
Taro.checkIsSoterEnrolledInDevice({
  checkAuthMode: 'fingerPrint',
  success: function (res) {
    console.log(res.isEnrolled)
  }
})
API Support
| API | WeChat Mini-Program | H5 | React Native | 
|---|---|---|---|
| Taro.checkIsSoterEnrolledInDevice | ✔️ |