EddyVerbruggen / nativescript-fingerprint-auth

:nail_care: 👱‍♂️ Forget passwords, use a fingerprint scanner or facial recognition!
MIT License
134 stars 33 forks source link

iOS Passcode fallback never presented after failed TouchID #46

Closed CAJazzer closed 5 years ago

CAJazzer commented 5 years ago

Using the Demo app on my iOS device, the "verify with passcode fallback" call simply reverts to the catch alert() in doVerifyFingerprint() after 3 failed attempts using touch. No err is displayed (undefined), only the title and okButtonText. my iOS version: 12.1.3

EddyVerbruggen commented 5 years ago

I just tested the embedded demo app on my iPad Pro and it behaves as expected: after failing to scan the finger 3 times the promise is rejected. Can you give it a try?

CAJazzer commented 5 years ago

Thanks,

Same results.

I downloaded (cloned) the demo, then used Xcode to set a valid certificate and run the project on my iPhone 6s & on my iPad Air.

The problem is I never get the passcode screen.

Using the “verify with passcode” button, after 3 tries all I get is the alert dialog:

Biometric ID NOT OK / canceled

Mmkay

"Never get the passcode fallback"

marcocasadio commented 5 years ago

hi, the same for me

bradmartin commented 5 years ago

I looked into this. Might need to use the DeviceOwnerAuthentication of LAPolicy for the passcode fallback. Not 100% certain on this ATM.

EddyVerbruggen commented 5 years ago

I've just tested with Face ID on my iPhone X and it seems to work as expected. The only thing I can think of is this check failing so it fell through to the 'verify with custom callback' method.

So I've applied a small change where this fall through will still trigger the passcode fallback by applying the policy @bradmartin suggested.