Skip to content

sabariferin/cordova-plugin-fingerprint-aio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Plugin Fingerprint All-In-One

A ndroid and IO s

NPM

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.

Features

  • Check if fingerprint scanner is available
  • Fingerprint authentication
  • ngCordova support - Pull request
  • Ionic Native support - Pull request

Platforms

  • Android
  • iOS - XCode 8 required, plugin uses Swift 3

How to use

Check if fingerprint authentication is available

Fingerprint.isAvailable(isAvailableSuccess, isAvailableError);

    function isAvailableSuccess(result) {
      alert("Fingerprint available");
    }

    function isAvailableError(message) {
      alert(message);
    }

Show authentication dialogue

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);
    }

Example

ngCordova Example

Ionic Native Example

Demo app: https://github.com/NiklasMerz/fingerprint-aio-demo

Thanks to the authors of the original fingerprint plugin:

Android

iOS

License

  • Project and iOS source -> MIT
  • Android source -> MIT and Apache 2.0

About

Cordova Plugin for fingerprint sensors with Android and iOS support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 93.9%
  • Swift 4.3%
  • JavaScript 1.8%