isBiometricsReady(options)

Verify if the biometrics hardware or pin code is available to use to verify the user’s device ownership.

Syntax 

1import { getBiometricsService } from 'lightning/mobileCapabilities';
2isBiometricsReady(options: BiometricsServiceOptions): Promise<Object>;

Parameters 

Returns 

A Promise object that resolves as a Boolean value. true if the biometrics hardware or pin code is available for use and false otherwise. If an error is encountered, the error is returned via a rejected promise.

Usage 

1myBiometricsService
2  .isBiometricsReady(options)
3  .then((results) => {
4    if (result === true) {
5      console.log("✔ Biometrics ready.");
6    } else {
7      console.log("𐄂 Biometrics unavailable.");
8    }
9  })
10  .catch((error) => {
11    console.error("Error code: " + error.code);
12    +console.error("Error message: " + error.message);
13  });

See Also

Release Preview

This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.