Skip to content

Instantly share code, notes, and snippets.

@rzaitov
Created February 14, 2014 14:53
Show Gist options
  • Save rzaitov/9002349 to your computer and use it in GitHub Desktop.
Save rzaitov/9002349 to your computer and use it in GitHub Desktop.
no way to remove ugly alert
public WebAuthenticatorController (WebAuthenticator authenticator)
{
this.authenticator = authenticator;
authenticator.Error += new EventHandler<AuthenticatorErrorEventArgs> (this.HandleError);
authenticator.BrowsingCompleted += new EventHandler (this.HandleBrowsingCompleted);
bla bla bla
}
private void HandleError (object sender, AuthenticatorErrorEventArgs e)
{
Action continuation = this.keepTryingAfterError ? new Action (this.BeginLoadingInitialUrl) : new Action (this.Cancel);
if (e.Exception != null)
{
this.ShowError ("Authentication Error", e.Exception, continuation);
return;
}
this.ShowError ("Authentication Error", e.Message, continuation);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment