NiklasMerz / cordova-plugin-fingerprint-aio

Cordova Plugin for fingerprint sensors (and FaceID) with Android and iOS support
https://www.npmjs.com/package/cordova-plugin-fingerprint-aio
MIT License
323 stars 188 forks source link

iOS - Passcode on but touch id off issue #85

Closed gintechsystems closed 6 years ago

gintechsystems commented 6 years ago

Hello,

I have tried testing against only having a passcode on but turning off touch id on iOS. It looks like you have the switch handling for biometric type none but are returning finger. I believe this should return none as it is saying there is no biometric available.

Has anyone else had this issue?

NiklasMerz commented 6 years ago

If TouchId is turned off the check function should return that. But you are right. If the authentication was done with passcode this should be in the returned value. Have you tried replacing finger in the .none case? If that is the solution feel free to submit a pull request.

gintechsystems commented 6 years ago

I was only testing against isAvailable and looked at the source and realized what was going on, but have not tried updating the .none case. Are you saying it should be finger and if so why?

I believe you can update canEvaluatePolicy passing deviceOwnerAuthenticationWithBiometrics.

I will try simply changing it to none though if you prefer and see if that works.

Also, great plugin! It has saved me tons of time.

NiklasMerz commented 6 years ago

@gintechsystems Did you mean something like this #86 ? Feel free to leave a review or explain what you would like to change.

gintechsystems commented 6 years ago

@NiklasMerz Yes, that is exactly what I was talking about. That should resolve the problem and I can work with that.