Open LagniappeRob opened 4 years ago
Hi @LagniappeRob,
I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.
I have the same issue on Android 10, any news on this issue ?
@LagniappeRob @vladPanasiuk That's how it works. If you allow alternative authentication by passing true, you ofc. get available back.
if you don't want to allow alternative authentication (pin, pattern, ...), don't pass true. And if you want to allow alternative authentication you have to call AuthenticateAsync
also with allowalternativeauthentication set to true.
@LagniappeRob @vladPanasiuk That's how it works. If you allow alternative authentication by passing true, you ofc. get available back.
if you don't want to allow alternative authentication (pin, pattern, ...), don't pass true. And if you want to allow alternative authentication you have to call
AuthenticateAsync
also with allowalternativeauthentication set to true.
I understand that. I do not allow alternative authentication. But the CrossFingerprint.Current.IsAvailableAsync (false) returns true while the phone does not support any type of biometric authentication. And the CrossFingerprint.Current.GetAuthenticationTypeAsync() returns Fingerprint. This is on a Samsung Galaxy A10, Android 10
I have the same issue on a Samsung T510 tablet running Android 10 where the IsAvailableAsync(true)
returns true, but the actual authentication with AuthenticateAsync(conf) with AllowAlternativeAuthentication
set to true returns false and anErrorMessage = "Biometric hardware unavailable"
. So now I test for this error message, which is a workaround but not so pretty.
@klogeaage but you can't know beforehand if the user is enrolled, right?
@rodrigojuarez not sure what you mean by 'enrolled'?
Is the term used on iOS to indicate that the user has opted in from the operating system's settings to use biometrics
My comments specifically mentioned an Android device, which is configured to require a pin whenever you unlock the screen. Apart from that, it doesn't support any biometric devices, which is also reflected in the error message you get when attempting to do an AuthenticateAsync()
call. It is therefore inconsistent that the call to IsAvailableAsync(true)
returns true, which I believe this issue is about.
Steps to reproduce
No Fingerprints or Face registered on device, A pin has been set.
CrossFingerprint.Current.IsAvailableAsync(true) returns true
CrossFingerprint.Current.GetAvailabilityAsync(true) returns Available
CrossFingerprint.Current.GetAuthenticationTypeAsync() returns Fingerprint
Call to AuthenticateAsync returns ErrorMessage = NoFingerprint
Expected behavior
IsAvailable should be true and GetAvailability should be Available since a Pin has been set. The GetAuthenticationType should return Pin. Call to AuthenticateAsync should use Pin
Actual behavior
Fingerprint is returned by GetAuthenticationType. Call AuthenticateAsync immediately fails with error.
Crashlog
If something causes an exception paste full stack trace + Exception here
Configuration
Version of the Plugin: e.g. 1.0.0 / 1.0.1-alpha3 2.1.1
Platform: e.g. iOS 10.1 / Android 4.4 / ... (including version!!! e.g. Android 5.1 / i0S 10) Android 9
Device: e.g. HTC Sensation /i Phone 7 ... Samsung A50