Skip to content

Instantly share code, notes, and snippets.

@Injac
Created May 17, 2014 03:45
Show Gist options
  • Save Injac/43dc2fd899124916085e to your computer and use it in GitHub Desktop.
Save Injac/43dc2fd899124916085e to your computer and use it in GitHub Desktop.
Windows Phone 8.1 (WinRT, Universal Apps) Mobile Services - Important Snippet to avoid Exceptions if the user cancels the login
protected override void OnActivated(IActivatedEventArgs args)
{
base.OnActivated(args);
#if WINDOWS_PHONE_APP
if (args.Kind == ActivationKind.WebAuthenticationBrokerContinuation)
{
App.<mobileservice>.LoginComplete(args as WebAuthenticationBrokerContinuationEventArgs);
}
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment