React Native face or fingerprint or iris or pin or schema functionality for signing
npm install react-native-face-fingerprint-auth
npm install react-native-face-fingerprint-auth or yarn add react-native-face-fingerprint-auth
js
const rnFaceFingerprintAuth = new ReactNativeBiometrics()
rnFaceFingerprintAuth.isBiometryAvailable()
.then((result) => {
const { available, biometryType } = result
if (available && biometryType === BiometryTypes.TouchID) {
console.log('TouchID is supported')
} else if (available && biometryType === BiometryTypes.FaceID) {
console.log('FaceID is supported')
} else if (available && biometryType === BiometryTypes.Biometrics) {
console.log('Biometrics is supported')
} else {
console.log('Biometrics not supported')
}
})
`
$3
authenticate yourself using the type of biometric sensor available on your phone (TouchID, FaceID, Biometrics).
##### Example
`js
const rnFaceFingerprintAuth = new ReactNativeBiometrics()
rnFaceFingerprintAuth.
.faceOrFingerPrintAuth({
title: "Biometric login for my app",
subTitle: "Log in using your biometric credential",//Optionnel
description: "",//Optionnel
cancelButtonText: "Use account password",//Optionnel
confirmationRequired:false,//Optionnel
allowDeviceCredentials:false//Optionnel default false
})
.then(result => {
const { success } = result;
if (success) {
console.log("authentification reussit");
} else {
console.log("l'utilisateur a annuler");
}
})
.catch(() => {
console.log("erreur d'authentification !");
});
``