Skip to main content

Biometric Authentication

Biometric Authentication

Used for Biometric Authentication (Fingerprint Scanning & Facial Detection).

To get started using it, you must use KmpBiometrics. All functions are thread safe and main thread safe.


_9
KmpBiometrics.scanBiometrics({
_9
// if biometric returns a result successfully
_9
// if response is False, it means the user is not authenticated
_9
// if true, the user is successfully authenticated
_9
_9
val response = it
_9
}, {
_9
// use this action to process any error message back from the device biometric if anything goes wrong during authentication
_9
})

Authentication for this component uses a Popup to check the user's biometric profile (Face or Fingerprint). To configure the title or description, which is rendered to the User, please use the following:


_1
KmpBiometrics.setPromptInfo("Reason for Biometric Title", "A long description of reason for biometrics")

Setup for Android

For android please add this into your manifest:


_1
<uses-permission android:name="android.permission.USE_CREDENTIALS" />

Setup for iOS

Add the following into your device's info.plist file:


_2
<key>NSFaceIDUsageDescription</key>
_2
<string>Reason for why your app needs access to the facial detection</string>