单击关闭按钮后未显示Google一键登录UI

问题描述 投票:0回答:1

我正在按照此指南使新的Google一键式登录工作:

https://developers.google.com/identity/one-tap/web

google.accounts.id.initialize({
            client_id: '123123123123123123.apps.googleusercontent.com',
            cancel_on_tap_outside: false,
            callback: handleCredentialResponse
        });

        //google.accounts.id.prompt(true);

        google.accounts.id.prompt((notification) => {
            if (notification.isNotDisplayed() || notification.isSkippedMoment()) {

                // continue with another identity provider.
            }
    });

我正在使用One Tap JavaScript API来显示One Tap。它完美地完成了它需要做的事情。

客户端验证,并且一切正常,但是我遇到了一个问题。单击窗口右上角的关闭按钮关闭UI后,不再显示UI,并且当我检查通知状态时会显示此错误。

opt_out_or_no_session

即使被用户关闭,我该怎么做才能使UI保持显示状态?感谢您的帮助。

javascript asp.net-mvc oauth-2.0 google-signin google-authentication
1个回答
0
投票

这就是所谓的“指数冷却”功能。 https://developers.google.com/identity/one-tap/web/guides/features#exponential_cool_down上的更多详细信息。

Google One Tap是一种优化的用户体验,用户只需轻按一下即可登录或注册。如果用户不想登录/注册(通过关闭“一键关闭”),则不应在每次重新加载或导航页面时一次又一次显示。对于大多数用户来说,这是一个烦人的UX。使用降温功能,用户不会感到被迫登录/注册。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.