问题
Try sample from documentation https://developers.google.com/identity/protocols/OAuth2UserAgent#example We could select an account from popup dialog, but SignIn don't autorize in Google Chrome version 62.0.3202.94
In my example bilding by this documentation I got the error message with code "popup_closed_by_user"
In Google Chrome version 62.0.3202.94 method `
gapi.auth2.getAuthInstance().signIn(options).then(
function(resp) {
var auth_code = resp.code;
},
function(resp) {
var auth_code = resp.code;
});
`
got error response "popup_closed_by_user" and don't autorize user the same code works fine in oldest chrome version and in other browsers
回答1:
answer was found Go to chrome://settings/content/cookies, the "Block third-party cookies" setting. https://github.com/google/google-api-javascript-client/issues/357
来源:https://stackoverflow.com/questions/47355520/google-chrome-62-0-3202-94-gapi-auth2-getauthinstance-signin-popup-closed-by-u