测试Google一键式-已关闭,并且现在“被用户抑制"信息 [英] Testing Google One Tap - closed and now getting "suppressed-by-user" message

查看:133
本文介绍了测试Google一键式-已关闭,并且现在“被用户抑制"信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要添加 Google一键式api 到React应用程序.我正确显示一键登录模式.但是,我单击以关闭模式,现在收到以下响应,该响应基于

I am adding the Google One Tap api to a React application. I am correctly getting the one tap login modal showing up. However, I clicked to close the modal, and now am getting the following response, which I see is based on the cool down period for this api:

{
  "g": "display",
  "h": false,
  "j": "suppressed_by_user"
}

自从我测试应用程序以来,有没有办法覆盖此冷却期?

Since I am testing the application, is there a way to override this cool down period?

类似于以下:

  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);
    });
  }

推荐答案

我认为我已经解决了问题.为了完全清除localhost:3000的缓存,我必须遵循以下指南:

I think I've solved the issue. I had to follow the following guide in order to fully clear out the cache for the localhost:3000: https://superuser.com/questions/278948/clear-cache-for-specific-domain-name-in-chrome

F12 > Chrome Developer Tools> Application标签> Clear storage在左树中>选择所有数据项>点击Clear site data

F12 > Chrome Developer Tools > Application tab > Clear storage in left tree > Select all data items > click Clear site data

这篇关于测试Google一键式-已关闭,并且现在“被用户抑制"信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆