Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Fingerprint AIO

Improve this doc

Use simple fingerprint authentication on Android and iOS. Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio

Repo: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-fingerprint-aio
    $ npm install --save @ionic-native/fingerprint-aio@4
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { FingerprintAIO } from '@ionic-native/fingerprint-aio';

constructor(private faio: FingerprintAIO) { }

...

this.faio.show({
    clientId: 'Fingerprint-Demo',
    clientSecret: 'password', //Only necessary for Android
    disableBackup:true,  //Only for Android(optional)
    localizedFallbackTitle: 'Use Pin', //Only for iOS
    localizedReason: 'Please authenticate' //Only for iOS
})
.then((result: any) => console.log(result))
.catch((error: any) => console.log(error));

Instance Members

isAvailable()

Check if fingerprint authentication is available

Returns: Promise<any> Returns a promise with result

show(options)

Show authentication dialogue

Param Type Details
options FingerprintOptions

Options for platform specific fingerprint API

Returns: Promise<any> Returns a promise that resolves when authentication was successful

FingerprintOptions

Param Type Details
clientId string

Key for platform keychain

clientSecret string

Secret password. Only for android

(optional)
disableBackup boolean

Disable 'use backup' option. Only for android (optional)

(optional)
localizedFallbackTitle string

Title of fallback button. Only for iOS

(optional)
localizedReason string

Description in authentication dialogue. Only for iOS

(optional)

API

Native

General