
Biometrics are unique physical traits of a person, such as a face or fingerprint, used to verify their identity. Face recognition is now commonly used for device authentication on smartphones and tablets. This advanced biometrics verification method provides a safer and easier alternative to passwords, adding extra security for digital activities.
A Lightning Web Component can use a device’s biometric features to prompt the user for identity verification. When a biometric action takes place, the result is sent back to the Lightning Web Component that triggered it. These biometric checks run locally on the mobile device without needing a network connection, but it is available only in supported Salesforce mobile apps.
In this post, you can find a screen component that accesses the mobile device's biometrics capabilities.
How to Use the Component
1- Install the package using the installation links below.
2- Create a screen flow and add the "Biometrics Verification" screen component to a flow screen.

That's it, there is no input configuration for this screen component. It has only one boolean output called "validated" that shows whether the device ownership is verified.
Labels and Messages
This component has multiple labels and messages, and they are all custom labels that you can change or translate according to your needs.
{!$Label.Biometrics_Verification_Button} is the label of the button.
{!$Label.Biometrics_Verification_Verified_Message} is the verified message.
{!$Label.Biometrics_Verification_Not_Verified_Message} is the not verified message.
{!$Label.Biometrics_Verification_Not_Available_Message} is the not available message.

Compatibility and Requirements
BiometricsService is a JavaScript module that allows Lightning Web Components to access mobile hardware and operating system features. It requires access to device hardware and platform APIs, which are only available when running within a supported Salesforce mobile app. BiometricsService does not work in standard web browsers, whether on a desktop or mobile device.
This means that this screen component works only on the Salesforce mobile app. Therefore, you may want to check the device and hide/show this component based on the device type. You can use this component or this global variable to to check the device type.
Example
Let's say that you have a critical flow that deletes mass data, and you want to add an extra layer of security. You can use the Biometrics Verification component to use the face recognition to verify device ownership. Make sure to add an input validation to block the user if the device ownership is not verified.

Here is how the component works:

Installation Links
Use this link to install in production or developer edition environments.
Use this link to install in sandbox environments.
Leave a Reply