Capacitor Face ID Plugin
Allow users to authenticate with Face ID or Touch ID on iOS devices
Instalation
npm install capacitor-biometric
iOS Notes
iOS requires the following usage description be added and filled out for your app in Info.plist
:
Name: Privacy - Face ID Usage Description
Key: NSFaceIDUsageDescription
Example
; ; ...// check if device supports Face ID or Touch IDFaceId.isAvailable.then;
API
Method | Default | Type | Description |
---|---|---|---|
isAvailable() | Promise<{ value: string }> |
Checks if Face ID or Touch ID is available, and returns type if so. | |
auth(options?: {reason?: string}) | options: {reason: "Access requires authentication"} | Promise<void> |
Displays the Face ID or Touch ID screen |