Before You Start
Before you get started, learn the development process.
-
Obtain the user authentication capabilities supported by the device.
-
Initiate a request for user authentication and obtain the authentication result.
-
Verify and use the authentication result. For details, see Key Access Control via Secondary Authentication.
-
(Optional) Cancel authentication.
-
(Optional) Apply custom authentication.
Requesting Permissions
The application capable of user authentication based on biometric features (such as facial and fingerprints) must have the ohos.permission.ACCESS_BIOMETRIC permission.
This permission is a system_grant (system authorization) permission. You can declare it in the requestPermissions tag in the module.json5 file. For details, see Declaring Permissions.