【发布时间】:2020-11-04 06:52:58
【问题描述】:
我正在将Google One Tap api 添加到 React 应用程序。我正确地显示了一键登录模式。但是,我单击关闭模式,现在得到以下响应,我看到该响应基于此 api 的 cool down period:
{
"g": "display",
"h": false,
"j": "suppressed_by_user"
}
由于我正在测试应用程序,有没有办法覆盖这个冷却时间?
看起来像following:
componentDidMount() {
const handleCredentialResponse = response => {
console.log(response);
};
const client_id = "424242424-example26example44examplexyz.apps.googleusercontent.com";
const callback = handleCredentialResponse;
const auto_select = true;
google.accounts.id.initialize({ client_id, callback, auto_select });
google.accounts.id.prompt(notification => {
console.log(notification);
});
}
【问题讨论】:
标签: javascript reactjs google-api google-signin google-one-tap