How to do it...

Here are the instructions:

  1. Create a blank Ionic app (for example, FingerAuth) and cd to that folder, as shown here:
$ ionic start FingerAuth blank
$ cd FingerAuth
  1. Install the fingerprint aio plugin and the Ionic Native wrapper, using the following command:
$ ionic cordova plugin add cordova-plugin-fingerprint-aio$ npm install --save @ionic-native/fingerprint-aio
  1. Open ./src/pages/home/home.html and replace with the following code:
<ion-content padding>  <h1 padding>Secrets</h1>  <p *ngIf="!isAvailable">This Device doesn't have Fingerprint Sensor</p>  <p *ngIf="isAvailable && quote">{{quote.joke}}</p> <button id="reveal-button" color="primary" *ngIf="!!isAvailable" ion-button round (click)="authenticate()">Reveal a Secret</button> ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.