harmony 鸿蒙Using userAuthIcon

  • 2025-06-12
  • 浏览 (4)

Using userAuthIcon

userAuthIcon provides built-in authentication icons for easy embedding with your application’s UI. With userAuthIcon, you can:

  1. Easily integrate the facial authentication and fingerprint authentication icons into your applications.
  2. Customize the color and size of the icons. The icon style cannot be changed.
  3. Start the facial or fingerprint authentication pop-up component once the icon is tapped.

userAuthIcon supports the following types of authentication:

  • Facial authentication
  • Fingerprint authentication
  • Facial + lock screen password authentication
  • Fingerprint + lock screen password authentication
  • Facial + fingerprint + lock screen password authentication

The following figure shows the use of userAuthIcon for fingerprint authentication. When a user taps the fingerprint icon on the left (implemented by userAuthIcon), the system automatically launches the system authentication component shown on the right to complete user authentication. With userAuthIcon, you do not need to initiate an authentication request through an API, which simplifies the authentication process.

user_auth_icon_demo

Example

For details, see @ohos.userIAM.userAuthIcon.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙User Authentication Kit (User Authentication Service)

harmony 鸿蒙Applying Custom Authentication

harmony 鸿蒙Canceling User Authentication

harmony 鸿蒙Obtaining Enrolled Credential Status

harmony 鸿蒙Obtaining Supported Authentication Capabilities

harmony 鸿蒙Before You Start

harmony 鸿蒙Initiating User Authentication

harmony 鸿蒙Introduction to User Authentication Kit

0  赞