Testing Google One Tap - closed and now getting “suppressed-by-user” message

心不动则不痛 提交于 2020-07-23 06:20:33

问题


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?

Looks like the 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);
    });
  }

回答1:


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 tab > Clear storage in left tree > Select all data items > click Clear site data



来源:https://stackoverflow.com/questions/62903602/testing-google-one-tap-closed-and-now-getting-suppressed-by-user-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!