aparajita / capacitor-biometric-auth

Easy access to native biometric auth APIs on iOS and Android
MIT License
135 stars 21 forks source link

iOS - Authentication cancelled. #35

Closed vadimwe closed 1 week ago

vadimwe commented 3 weeks ago

Suddenly on app start I always get auth error: Authentication cancelled (systemCancel). What that means? And how to fix this? Before code worked excellent.

Check result: isEnabled: true, isAvailable: true, isPinAvailable: true,

Log from xCode:

{"biometryType":2,"strongBiometryIsAvailable":true,"strongCode":"","isAvailable":true,"strongReason":"","reason":"","code":"","biometryTypes":[2],"deviceIsSecure":true}

To Native ->  BiometricAuthNative internalAuthenticate 27138348
ERROR MESSAGE:  {"errorMessage":"Authentication canceled.","code":"systemCancel","message":"Authentication canceled."}
Ionic:

   Ionic CLI                     : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 8.2.7
   @angular-devkit/build-angular : 18.1.4
   @angular-devkit/schematics    : 18.1.4
   @angular/cli                  : 18.1.4
   @ionic/angular-toolkit        : 11.0.1

Capacitor:

   Capacitor CLI      : 6.1.2
   @capacitor/android : 6.1.2
   @capacitor/core    : 6.1.2
   @capacitor/ios     : 6.1.2

Utility:

   cordova-res : 0.15.4
   native-run  : 2.0.1

System:

   NodeJS : v18.20.3 (/usr/local/bin/node)
   npm    : 10.7.0
   OS     : macOS Unknown

Any ideas or suggestions?

aparajita commented 3 weeks ago

No idea. What version of iOS? Same thing in a simulator?

vadimwe commented 1 week ago

Sorry this issue was my bad. You will get Authentication cancelled (systemCancel) error if you try auth while previous try is still running.

aparajita commented 1 week ago

Sorry this issue was my bad. You will get Authentication cancelled (systemCancel) error if you try auth while previous try is still running.

That is the proper response from the system, it has nothing to do with the plugin. It's up to you to prevent multiple auth attempts from being made.

vadimwe commented 1 week ago

Yes sure. plugin works perfect. Thank you!