Xamarin Auth on UWP - Exception third time presenter.Login(...) is used

I use the Presenter-way, in a Xamarin Forms Project.
Using microsofts oauth-page as a test.

1: Click login button
2: presenter.Login(_auth);
3: OnError() { (sender as OAuth2Authenticator).OnCancelled(); }
Repeat Three times => Unhandled exception.
--- Stack trace --------------
  at Xamarin.Auth.WebAuthenticatorPage.auth_Error(Object sender, AuthenticatorErrorEventArgs e)
  at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
  at Xamarin.Auth.Authenticator.<>c__DisplayClass30_0.b__0()
  at Plugin.Threading.UIThreadRunInvoker.<>c__DisplayClass0_0.b__0()
--- end of trace -----------
However, only on UWP. Works (unlimited times) on Android and iOS.

See attached solution

Moljac might have a fix for this? =)

Regards Andreas Brosten

Sign In or Register to comment.