Skip to content

Instantly share code, notes, and snippets.

@biganth
Last active March 23, 2016 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biganth/c3f393e0cbb22a5c86fa to your computer and use it in GitHub Desktop.
Save biganth/c3f393e0cbb22a5c86fa to your computer and use it in GitHub Desktop.
Web API2 external login
function Login() {
jQuery.support.cors = true;
$.ajax({
type: 'GET',
url: 'api/Account/ExternalLogins?returnUrl=%2F&generateState=true',
dataType: 'JSON',
success: function (data) {
var url = (data[0].Url);
window.open(url, '_self', false);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment