Google Chrome 62.0.3202.94 gapi.auth2.getAuthInstance().signIn popup_closed_by_user

一笑奈何 提交于 2020-02-02 14:30:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!