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

"Try Face ID Again" does nothing on click. #228

Open
belmonmi opened this issue Aug 8, 2022 · 1 comment
Open

"Try Face ID Again" does nothing on click. #228

belmonmi opened this issue Aug 8, 2022 · 1 comment

Comments

@belmonmi
Copy link

belmonmi commented Aug 8, 2022

The AuthenticateAsync() method doesn't return control to client code unless authentication completed successfully or user clicked "Cancel". Clicking on "Try Face ID Again" does nothing.

Steps to reproduce

  1. Make sure CrossFingerprint is registered with app builder DI Services:
    inBuilder.Services.AddSingleton(typeof(IFingerprint), CrossFingerprint.Current);

  2. Add button to a page or any other way to call AuthenticateAsync() method, for example:
    `

private async Task AuthenticateWithBiometrics()
{
try
{

  AuthenticationRequestConfiguration tmpConf = new AuthenticationRequestConfiguration(
    "Authentication",
    "Authenticate access to application"
    );

  tmpConf.AllowAlternativeAuthentication = true;

  IFingerprint tmpFingerprint = MauiProgram.Services.GetService<IFingerprint>();

  // on the next line: execution continues only when authentication completed successfully or user clicked on "Cancel"
  FingerprintAuthenticationResult tmpAuthResult = await tmpFingerprint!.AuthenticateAsync(tmpConf, CancellationToken.None);

  this.m_Logger?.LogInformation($"FingerprintAuthenticationResult - Authenticated: {tmpAuthResult.Authenticated} Status:{tmpAuthResult.Status}");
		
		return tmpAuthResult.Authenticated;
}
catch (Exception ex)
{
  this.m_Logger?.LogError($"AuthenticateWithBiometrics() failed ({ex.GetType().Name}): {ex.Message}");
  return false;
}

}

`

Expected behavior

AuthenticateAsync() returns FingerprintAuthenticationResult with Authenticated property false and Status with value "FingerprintAuthenticationResultStatus.Failed" . This is will allow to implement appropriate handling of biometrics failure.

Actual behavior

The AuthenticateAsync() doesn't returns unless authentication is success or user clicked on "Cancel". Clicking on "Try Face ID Again" does nothing.

Configuration

Version of the Plugin: 3.0.0-beta.1

Platform: iOS 15.4

Device: iPhone 12 Pro

@smsissuechecker
Copy link

Hi @belmonmi,

I'm the friendly issue checker.
Thanks for using the issue template 🌟
I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

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