Authentication method - need advice

Hello people :slight_smile:

I started an application with fingerprint authentication, which works perfectly.

Now, I look for a moment for a way to ensure that if fingerprint authentication does not exist, the user will use a pin code or the diagram of his mobile.

Is there an Ionic plugin to do this or do I have to code it myself?

my code:

// login 
	  login() {
	    if (!this.data.userName) {
	      this.utility.appAlert("Wait!","Username please");
	      return;
	    }
	    else {
	      //Check if Fingerprint is available
	      this.androidFingerprintAuth.isAvailable()
	      .then(result => {
	        if(result.isAvailable){
	          this.androidFingerprintAuth.encrypt(this.fingerPrintAuthOptions)
	          .then(result => { 
	            if (result.withFingerprint) {
	              console.log('Successfully encrypted credentials.');
	              console.log('Encrypted credentials: ' + result.token);
	              this.navCtrl.setRoot(HomePage);
	            } 
	            else if (result.withBackup) {
	              console.log('Successfully authenticated with backup password!');
	              this.navCtrl.setRoot(HomePage);
	            } 
	            else console.log('Didn\'t authenticate!');
	          })
	          .catch(error => {
	            if (error === this.androidFingerprintAuth.ERRORS.FINGERPRINT_CANCELLED) {
	              console.log('Fingerprint authentication cancelled');
	            } 
	            else console.error(error)
	          });
	        }
	        else {
	          this.utility.appAlert("Error!", error);
	          
	        }
	      })
	    }
	  }

Thank you for your answers