Auth0 Xamarin android loginAsync method not awaited

  • Which SDK this is regarding: xamarin android
  • SDK Version: 3.1.3
  • Platform Version: Visual Studio Community 2019 for Mac
    Version 8.8.10 (build 2)
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

If auth0 encounters an error sent from the rules called during authentication, the user is presented with the login page with that error injected, which is the desired flow. However, if the user cancels the login page with the error injected and repeats the process, the login page is presented twice. The number of login pages shown is incremented every time that the authentication process is repeated.

The same feature works on iOS as expected.

This is the code for the authentication method:

public async Task AuthenticateAsyncAuth0(string errorResponse = null)
{
  var loginResult = await _client.LoginAsync(extraParameters: _viewModel.GetAuth0LoginParameters(options, errorResponse));
  if (loginResult.IsError)
  {
    _viewModel.ParseError(loginResult.Error, async (error) =>
    {
      await this.AuthenticateAsyncAuth0(error);
    });
  }
  else
  {
    await this.SignIn();
  }
}