Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device nip fallback does not works on iOS 17-18 #5

Open
spelletier opened this issue Oct 31, 2024 · 1 comment
Open

Device nip fallback does not works on iOS 17-18 #5

spelletier opened this issue Oct 31, 2024 · 1 comment

Comments

@spelletier
Copy link

Using NuGet package Oscore.Maui.Biometric Version="1.0.1" on device (iPhone 13 pro with iOS 18.1) and simulator (iPhone 15 pro with iOS 17.2), the biometric prompt never ask for the device NIP even after a failed faced attempt.

The sample and code indicate this code should works:

if (await BiometricAuthentication.Current.IsAvailableAsync(AuthenticationStrength.Any))
{
var config = new AuthenticationRequest("Confirmez votre identité", "Pour accéder à vos messages");
config.Strength = AuthenticationStrength.Any;
var authResult = await BiometricAuthentication.Current.AuthenticateAsync(config);
}

The prompts ask for faceid only, it behave like if using LAPolicy.deviceOwnerAuthenticationWithBiometrics instead of LAPolicy.deviceOwnerAuthentication.

My understanding of the source code in this repository is that using config.Strength = AuthenticationStrength.Any should transpose to LAPolicy.deviceOwnerAuthentication but the program execution does not confirm this.

@HavenDV
Copy link
Collaborator

HavenDV commented Oct 31, 2024

private static LAPolicy GetPolicy(AuthenticationStrength strength)
{
return strength switch
{
AuthenticationStrength.Any => LAPolicy.DeviceOwnerAuthentication,
_ => LAPolicy.DeviceOwnerAuthenticationWithBiometrics,
};
}

Thanks for raising the issue. Interesting, as it is clearly stated in the code, so it probably needs some research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants