React Native KeyguardManager And LocalAuthentication Lib (Android and Ios)
MIT License
React Native KeyguardManager And LocalAuthentication Lib (Android and Ios)
npm install @nmh/react-native-device-auth
android/app/src/AndroidManifest.xml
:
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
ios/project/info.plist
:
<key>NSFaceIDUsageDescription</key>
<string>Enabling Face ID allows you quick and secure access to your account.</string>
import RNDeviceAuth from '@nmh/react-native-device-auth';;
// ...
const LABEL = 'This is a secure area, please authenticate yourself';
authenticate () {
return new Promise((resolve,reject)=>{
RNDeviceAuth.authenticate({reason:this._LABEL})
.then((status:any)=>console.log(status))
.catch((error:any)=>console.log(error))
})
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library