[Touch ID Plugin] Cancel button in TouchID prompt returning same error for invalid finger print
Forge component by Platform Maintenace
Application Type

I am developing an application using TouchID plugin. It has a button to cancel the prompt. But when I tap on the cancel, it is returning the same error that I get when I tap an invalid fingerprint. 

I am getting the following error:

Error code : "4"

Error message : "authenticationFailed"

This is causing an issue in my application as i am showing an alert when ever I am getting this error. "Wrong fingerprint detected." 

When I cancel the prompt it shouldn't show any message. But as I am getting the same error code. This is being shown .

This happens even when I am tapping outside the prompt. The prompt dismisses and the same error message is being shown.

How to avoid this?



Hi Sundeep,

Can you plz help share the OML with the issue or some screen shots to better understand the problem.

Hi Deepa,

Please find the screenshots and oml attached. You can tap on anywhere outside the prompt to cancel the prompt. Also try using entering an invalid finger print. Its giving the same error.


Dear Sundeep,

Please add the attached condition in your logic, If you are clicking cancel, the error won't occur. On clicking the other option if your fingerprint is valid, it will navigate to the required page or else it will throw the inbuilt error.

Porselvan Gnanavelu

I need to show an alert when the an invalid fingerprint is entered. For that, I am checking the error code that we get as response from 'TouchID' action. But it is giving same error code when I enter invalid finger print as well as when I cancel the biometric prompt. Here same error message is being shown in both cases. I need to show "Invalid fingerprint error when I enter invalid finger print" and "Biometric prompt cancelled" message when I cancel the biometric prompt.

This is my issue.

Dear Sundeep,

Try this, On cancelling you will receive the "Biometric prompt cancelled" alert and on invalid fingerprint you will receive the inbuilt validation error and on a valid finger print you will be navigated to the destination screen.

Hi Porselvan Gnanavelu,

I am not getting "Biometric prompt cancelled" alert. I am getting same error messages and code as I mentioned in the first post for both cancel and invalid fingerprint entry.

Error code : "4"

Error message : "authenticationFailed"

See, the TouchID Client Action is returning 2 output parameters.
1. Success - Boolean2

2. Error- with 2 attributes

          > ErrorCode - Text

          >  ErrorMessage - Text

I am getting Error code as "4" and Error Message as "authenticationFailed" in both cases.

Dear Sundeep,

Please find the attached OML and I have sent the tested scenarios video in the DM, as I couldn't upload the video here.


Hi Porselvan Gnanavelu,

Yes. your code is working fine. But I need show an error message when the user enters a wrong fingerprint.

How can I do this?

Hi Sundeep,

You could see the alert during the invalid fingerprint in the Testing video I sent. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.