Getting response after cancel login popup

Hi,

I’m working on Xamarin Forms and Xamarin Native apps.
Use Auth0.OidcClient 3.1.2 (in one app) and 2.3.0 (in another app).

To open login popup I’m using this code:

    var response = await auth0Client.LoginAsync();

     if (response.IsError)
    {
                throw new AuthException(response.Error);
    }

In both apps I have the same problem, but only for Android platform.

When I’m closing popup without login on iOS then compiler is going out this line:
var response = await auth0Client.LoginAsync()
and response object contain “UserCancel” error as I expect.

But problem appear on Android app. After closing popup compiler stuck on LoginAync.

Is it possible to after closing canceling Login Popup get “UserCancel” on Android like at iOS?

Thank you in advance for any help.

1 Like