我正在尝试按照本指南使新的谷歌一键登录工作:
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.
}
});
Run Code Online (Sandbox Code Playgroud)
我正在使用 One Tap JavaScript API 来显示 One Tap。它完美地完成了它需要做的事情。
客户端验证一切正常,但我有一个问题。通过单击窗口右上角的关闭按钮关闭 UI 后,UI 不再显示,当我检查通知状态时,它显示此错误;
选择退出或无会话
即使用户关闭了 UI,我需要做什么才能保持 UI 显示?我很感激任何帮助。
javascript asp.net-mvc google-authentication oauth-2.0 google-signin
google.accounts.id.initialize({
client_id: '111111111111.apps.googleusercontent.com',
cancel_on_tap_outside: false,
callback: handleCredentialResponse
});
google.accounts.id.prompt();
Run Code Online (Sandbox Code Playgroud)
我正在使用 Javascript 提示 UI,但找不到为弹出窗口设置新位置的方法。我将不胜感激任何帮助!