【问题标题】:Why did GoogleAuth.then() stop calling callbacks?为什么 GoogleAuth.then() 停止调用回调?
【发布时间】:2016-02-07 03:30:38
【问题描述】:

我的应用程序依赖于 Google 登录。今天突然间,GoogleAuth.then() 方法已经停止调用它的回调。这段代码什么都不做(不打印结果):

gapi.auth2.init({
    client_id: 'MYID.apps.googleusercontent.com',
    scope: 'profile email'
}).then(function() {
    console.log("success called");
}, function() {
    console.log("failure called")
});

即使使用其他方法来询问登录(例如在 isSignedIn 和 currentUser 上创建侦听器)正常工作,此代码也不会执行任何操作。

我们的代码没有改变,但这种破坏似乎正在慢慢地在我们的客户群中滚动,感觉有点像 Google 进行某种滚动部署。目前这个问题已经存在了几个小时。它已停止在我的笔记本电脑上运行,但仍可在我的手机上运行。我们在世界各地的许多客户正在经历不同的结果。

这是 Google 的错误吗?如何向他人举报?

【问题讨论】:

  • 我们也看到了这一点。肯定是google的问题。有更新吗?
  • 您还在遇到这个问题吗?现在应该解决这个问题。
  • 今天早上它似乎又开始工作了。有没有比 stackoverflow 报告这样的生产紧急情况更好/更快的方法?谷歌云平台支持(我们付费)以“不是我们的部门”对我们不屑一顾。

标签: google-signin google-identity-toolkit


【解决方案1】:

我今天遇到了类似的问题,因为我需要快速破解

<div class="g-signin2" data-onsuccess="onSignIn">

不工作,我现在这样称呼它。:

   <script src="https://apis.google.com/js/platform.js?onload=sss"
async defer></script>

function sss() {
    auth2 = gapi.auth2.getAuthInstance();
    auth2.isSignedIn.listen(
        function(isSigned){
            if (isSigned) onSignIn(window._auth2.currentUser.get());
            else signOut();
       })
    }

它有效。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多