Google SSO:退出错误(网站)

时间:2017-11-22 14:06:22

标签: javascript google-signin googlesigninaccount

我们正在尝试在您打开logout.php时从Google自动注销。 有时它可以工作,但大多数我们得到了错误nb。 有谁知道如何解决这个问题?

<script src="https://apis.google.com/js/platform.js"></script>
<script>
           setTimeout(function() {
                var auth2 = gapi.auth2.getAuthInstance();
                auth2.signOut().then(function () {
                    window.location.href='NEWPAGE.php' ?>';
                });
            }, 500);
    </script>

错误:

Uncaught Error: nb
    at tE (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.R4vvmD-bxFg.O/m=signin2/rt=j/sv=1/d=1/ed=1/am=AQ/rs=/cb=gapi.loaded_0:183:39)
    at jF.<anonymous> (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.R4vvmD-bxFg.O/m=signin2/rt=j/sv=1/d=1/ed=1/am=AQ/rs=/cb=gapi.loaded_0:224:235)
    at new _.C (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.R4vvmD-bxFg.O/m=signin2/rt=j/sv=1/d=1/ed=1/am=AQ/rs=/cb=gapi.loaded_0:112:296)
    at jF.BT (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_GB.R4vvmD-bxFg.O/m=signin2/rt=j/sv=1/d=1/ed=1/am=AQ/rs=/cb=gapi.loaded_0:224:215)
    at signOut (1:220:42)
    at 1:216:17
    at https://apis.google.com/js/platform.js:18:348
    at Oa (https://apis.google.com/js/platform.js:10:467)
    at b (https://apis.google.com/js/platform.js:18:331)
    at Array.E.(anonymous function) (https://apis.google.com/js/platform.js:18:427)

1 个答案:

答案 0 :(得分:0)

Google+登录功能已完全弃用,并将于2019年3月7日关闭。这将是逐步关闭,间歇性故障最早可从2019年1月28日开始。

您必须立即使用:https://developers.google.com/identity/