title: Google Sign in Prompt fails to trigger again after clicking on cancel
body: <p>So I've been trying to find a way to call the google prompt by using my own button in React, and not googles, cause it doesn't fit with the styles of the platform that I am busy building</p>
  <p>So, I followed this wonderful persons idea <a href="https://stackoverflow.com/a/71431475/5413196">https://stackoverflow.com/a/71431475/5413196</a> (the second part of it and created the functions as he states and a button that calls <code>google.accounts.id.prompt();</code> <code>onClick</code> and it worked! I was very pleased with the result, but after testing it a few times I realized that the google prompt will only show when you sign in with an account but when you click on the cancel button  or <code>X</code> in the prompt the prompt goes away and if you click the custom (my button) button again it doesnt bring up the prompt.</p>
  <p>I had a look in my console for any errors, investigated local storage and saw that there's a cookie <code>g_state:&quot;{&quot;i_l&quot;:1,&quot;i_p&quot;:1234567890}&quot;</code> deleted it and tried again, magically the prompt pops up and I can select an account, checked the localstorage and saw that there is a cookie <code>g_state:&quot;{&quot;i_l&quot;:0}&quot;</code> when a google account has been selected.</p>
  <p>so I tested and clicked cancel <code>X</code> on the prompt and the cookie is set to <code>g_state:&quot;{&quot;i_l&quot;:1,&quot;i_p&quot;:1234567890}&quot;</code> and tried triggering the promt again - nothing...</p>
  <p>so I want to create a if statement that checks if the cookie exist <code>g_state:&quot;{&quot;i_l&quot;:1,&quot;i_p&quot;:1234567890}&quot;</code> and if it does then delete it and trigger the <code>google.accounts.id.prompt();</code></p>
  <p>but this feels a bit hacky &amp; messy, do any of you know how I can get the prompt to pop up every time the user clicks the button without doing the if statement check and deleting the cookie, etc ?</p>
  <p>the code:</p>
  <pre><code>  const googleCallBack = (response) =&gt; {
      const token = response.credential;
      console.log('token: ', token);
  
    };
  
    const googlePrompt = () =&gt; {
      /* global google */
      google.accounts.id.initialize({
        client_id: process.env.GOOGLE_CLIENT_ID,
        callback: googleCallBack,
      });
      google.accounts.id.prompt();
    };
  
      &lt;button
        onClick={googlePrompt}
        value=&quot;Log in with Google&quot;
      /&gt;
  
  </code></pre>