This plugin is an attempt to provide a single interface for accessing fingerprint hardware on both Android 6+ and iOS.
There are some great cordova plugins out there that make use of the fingerprint APIs provided by Android and iOS. But I could not find a project which supports both platforms (correct me if I am wrong). I decided to take their native code and bundle it together in one plugin.
- Check if fingerprint scanner is available
- Fingerprint authentication
- ngCordova support - Pull request
- Ionic Native support - Pull request
- Android
- iOS - XCode 8 required, plugin uses Swift 3
Tutorial about using this plugin with Ionic thanks to Paul Halliday
Install from NPM
cordova plugin add cordova-plugin-fingerprint-aio --save
or use this Github repo
Fingerprint.isAvailable(isAvailableSuccess, isAvailableError);
function isAvailableSuccess(result) {
alert("Fingerprint available");
}
function isAvailableError(message) {
alert(message);
}
Fingerprint.show({
clientId: "Fingerprint-Demo",
clientSecret: "password" //Only necessary for Android
}, successCallback, errorCallback);
function successCallback(){
alert("Authentication successfull");
}
function errorCallback(err){
alert("Authentication invalid " + err);
}
Optional parameters
disableBackup: If true remove backup option on authentication dialogue for Android. Default false.
- Project and iOS source -> MIT
- Android source -> MIT and Apache 2.0