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.

Workflow

The following figure shows the workflow for mini-program developers to implement biometric authentication:

yuque_diagram.jpg

This workflow consists of the following three steps:

  1. In your mini program, determine the specific areas where users need to complete biometric authentication.
  2. (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.
  3. 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

my.checkLocalBioAuthSupported

Check the availability of biometric authentication on the user's device.

my.startLocalBioAuth

Initiate a biometric authentication process on the user's device.