fingerun
v0.0.7
Published
React native module for fingerprint
Downloads
34
Maintainers
Readme
fingerun
React Native Plugin for checking fingerprint
Installation
npm install fingerunApp Permissions
Add the following permissions to their respective files:
Android
In your AndroidManifest.xml:
API level 28+ (Uses Android native BiometricPrompt) (Reference)
<uses-permission android:name="android.permission.USE_BIOMETRIC" />API level 23-28 (Uses Android native FingerprintCompat) Reference)
<uses-permission android:name="android.permission.USE_FINGERPRINT" />Usage
import Fingerun, { toast } from 'fingerun';
// ...
Fingerun.isSupported()
.then(res => {
toast('Fingerprint supported');
Fingerun.on('error', data => {
// on error
});
Fingerun.on('match', data => {
// code when finger matched
toast('Fingerprint matched');
});
Fingerun.on('not-match', data => {
// code when finger not-match or blocked
toast(JSON.stringify(data));
});
// Start matching
Fingerun.start(3); // min: 1, max:5
})
.catch(e => {
// error occured
toast('Fingerprint not supported');
});Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with Iandrisoa Tactic Rayan
