Testing Google One Tap - closed and now getting "suppressed-by-user" message
Asked Answered
P

3

2

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);
    });
  }
Permafrost answered 14/7, 2020 at 20:35 Comment(0)
P
3

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

Permafrost answered 14/7, 2020 at 20:46 Comment(0)
Y
4

When trying to migrate to the FedCM API for Google One tap the accepted answer did not work for me.

The docs mention that:

When FedCM is enabled, Chrome users can reset cooldown status by clicking on the lock icon in the address bar and clicking the Reset Permission button.

Just click on the icon next to URL in the address bar, and select Site Settings

Access site settings in localhost Access site settings in https website

And then select Reset Permissions and Reload.

Yaupon answered 24/4, 2024 at 12:25 Comment(0)
P
3

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

Permafrost answered 14/7, 2020 at 20:46 Comment(0)
V
-1

Another way to avoid 'cool down' during developement is to use incognito browser mode.

You can restart the incognito browser to clear all cached content.

Vaca answered 3/8, 2020 at 16:22 Comment(2)
For some reason one-tap modal is never triggered in Incognito Chrome. Is it just me or others have the issue as well? Works perfectly in regular clean Chrome session, FireFox including incognito and other browsers. It looks like one-tap login started to respect incognito mode. Could someone confirm?Cuddle
Incognito triggers opt_out_or_no_sessionCodification

© 2022 - 2025 — McMap. All rights reserved.