xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 505 forks source link

[Bug] WebAuthenticatorResult throws task cancelled exception on Android #1696

Open nodoid opened 3 years ago

nodoid commented 3 years ago

Description

I'm using the IdentityService and RequestProvider code from https://github.com/davidbritch/xamarin-forms/tree/master/WebAuthenticatorDemo with the CallBack activity class set as in the demo repo.

The CreateAuthorizationRequest returns correctly but when fed into the WebAuthenticatorResult, the Task Cancelled exception is thrown.

The strange thing is that the webview launches with the auth website, but the exception keeps getting thrown. Authentication occurs on the website but the exception keeps being thrown.

Steps to Reproduce

  1. Use the example at https://github.com/davidbritch/xamarin-forms/tree/master/WebAuthenticatorDemo
  2. Change the URL for the auth service to go to

Expected Behavior

Authentication works

Actual Behavior

Task cancelled exception thrown

Basic Information

Screenshots

Reproduction Link

mhedqvist commented 3 years ago

https://github.com/xamarin/Essentials/issues/1783 similar problem using UWP. Tried removing stuff from the response?