Biometric authentication API overview
Mini-program developers can incorporate biometric authentication into their mini programs to verify users based on their unique biometric characteristics, such as face ID or fingerprint, depending on device capabilities. This topic provides an overview of the JSAPIs associated with this secure and convenient authentication method.
Before you begin
Before you begin, it is recommended to consult with the super apps to confirm if they have integrated the Biometric Authentication component. If the super app has not integrated this component, your mini program will encounter errors when calling the associated JSAPIs.
Workflow
The following figure shows the workflow for mini-program developers to implement biometric authentication:
This workflow consists of the following three steps:
- In your mini program, determine the specific areas where users need to complete biometric authentication.
- (Optional) If you prefer to check the availability of biometric authentication on the user's device before initiating the authentication process, integrate the my.checkLocalBioAuthSupported JSAPI. For more information, refer to my.checkLocalBioAuthSupported.
- Integrate the my.startLocalBioAuth JSAPI to initiate a biometric authentication process. For more information, refer to my.startLocalBioAuth.
API list
The following table lists the JSAPIs that are associated with biometric authentication and their descriptions:
JSAPI | Description |
Check the availability of biometric authentication on the user's device. | |
Initiate a biometric authentication process on the user's device. |