Skip to content

Failed login attempt should use immediate false as to show allow popup#12

Open
abs2g08 wants to merge 1 commit intochristiansmith:masterfrom
abs2g08:master
Open

Failed login attempt should use immediate false as to show allow popup#12
abs2g08 wants to merge 1 commit intochristiansmith:masterfrom
abs2g08:master

Conversation

@abs2g08
Copy link

@abs2g08 abs2g08 commented Apr 3, 2015

See: https://developers.google.com/youtube/v3/code_samples/javascript

In particular:

// Handle the result of a gapi.auth.authorize() call.
function handleAuthResult(authResult) {
if (authResult && !authResult.error) {
// Authorization was successful. Hide authorization prompts and show
// content that should be visible after authorization succeeds.
$('.pre-auth').hide();
$('.post-auth').show();
loadAPIClientInterfaces();
} else {
// Make the #login-link clickable. Attempt a non-immediate OAuth 2.0
// client flow. The current function is called when that flow completes.
$('#login-link').click(function() {
gapi.auth.authorize({
client_id: OAUTH2_CLIENT_ID,
scope: OAUTH2_SCOPES,
immediate: false
}, handleAuthResult);
});
}
}

@64bits
Copy link

64bits commented May 10, 2015

See my issue here:
#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants