This library enables you to quickly add biometric authentication (fingerprint, Touch ID and Face ID) to your React Native app.
import BiometricAuthentication from 'react-native-biometric-authentication';The library will return true or false.
var hasBiometricAuthentication = await BiometricAuthentication.hasBiometricAuthentication()or
BiometricAuthentication.hasBiometricAuthentication()
.then((hasBiometricAuthentication) => {
// do something with hasBiometricAuthentication
}) The library will return:
- Fingerprint (Android)
- Touch ID (iOS)
- Face ID (iOS)
- Unknown**
** Unknown will be shown if the device does not have biometric authentication, or, when the use of biometric authentication has been disallowed by the user.
var biometricType = await BiometricAuthentication.biometricType()or
BiometricAuthentication.biometricType()
.then((biometricType => {
// do something with biometricType
}) This will prompt the user to authenticate using the devices supported biometric authentication method.
var isAuthenticated = await BiometricAuthentication.authenticate("Authenticate to continue...")or
BiometricAuthentication.authenticate("Authenticate to continue...")
.then((authenticated => {
// do something with authenticated
})