EddyVerbruggen / nativescript-fingerprint-auth

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

Touch ID strange behavior IOS13 #64

Closed YoussefGheith closed 4 years ago

YoussefGheith commented 4 years ago

Hi Eddy

I'm facing a strange behavior with this awesome plugin of yours after upgrading my iPhone7 OS to IOS 13.1.1

The Touch ID dialog doesn't show directly after a Button Click (for example) Sometimes I need to make another action to my phone screen to make the dialog appears
or sometimes the Touch ID dialog shows twice .

debug error

evaluatePolicy:options:uiDelegate:reply:]_block_invoke -> (null), Error Domain=com.apple.LocalAuthentication Code=-1004 "User interaction is required." UserInfo={BiometryType=1,

gabrielbiga commented 4 years ago

In my application the fingerprint dialog doesn't show at all in iOS 13+.

EddyVerbruggen commented 4 years ago

Do you experience this with the demo app in this repo as well? If not, can you share a demo? And wondering if this also happens to you with FaceID?

YoussefGheith commented 4 years ago

Hi Eddy

I tried the demo app with my iPhone 7 (Touch ID) The demo is a little bit buggy the Touch dialog is taking much longer and sometimes it doesn't show at all and i have to press the button twice.

Also i'm getting this message again Error Domain=com.apple.LocalAuthentication Code=-1004 "User interaction is required." UserInfo={BiometryType=1,

ghost commented 4 years ago

Hi Eddy I can confirm that the finger and face-id auth in the same app with iOS13 does not work correctly. Sometimes the native dialog appears after a click sometime after 2x click or it does not appear but the authentication is active (so I can enter touching the fingerprint without seeing the dialog)

EddyVerbruggen commented 4 years ago

I just updated the demo. Perhaps the alerts were hampering performance. It's lightning fast for me (FaceID on iPhone 11 Pro). Can you re-clone and try again? And if there's still an issue please reopen and share a video of the problem.

ghost commented 4 years ago

Hi I think there is somewhere a problem yet, please see this video (iPad 3, iOS 13.x.x latest )

https://drive.google.com/file/d/10_ZjhV7hBPmID5iZUBmEHlLQiu-PsZAS/view?usp=drivesdk

I have made some changes in my code so you can better seeing what is happening I click at the button -> the image background is being flashed indicating the action ,after 1.5 sec the verifyFingerprint will be called -> now the native popup should be opened but nothing happens till I reach the home button with my finger -- I tried several times and sometimes the popup is visible after the 1.5 sec delay but only very rare .... private activateScan() { try { this.biometricButtonState = true; this.biometricScanActive = true; this.scanTimerh = setInterval(()=> { this.biometricButtonState = !this.biometricButtonState; },500); setTimeout(() => { this.verifyFingerPrint(); },isIOS ? 1500 : 0); }catch(error) { console.log(onBiometricStackLoaded:${error}); this.feedback.error({ message: error }) }

this.fingerprintAuth.verifyFingerprint( { message: 'Scan your finger', // optional (used on both platforms) - for FaceID on iOS see the notes about NSFaceIDUsageDescription title: 'Biometric authentication', authenticationValidityDuration: 60, // optional (used on Android, default 5) // fallbackMessage: 'Enter Domain Password', // optional, the button label when scanning fails (default: 'Enter password') useCustomAndroidUI: true }) .then((enteredPassword) => { ....

igorgiovannini commented 4 years ago

The issue is still reproducible with the latest iOS versions (iOS 13.5, 13.5.1). Is there a workaround?