Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback for g-signin2 does not seem to get triggered #1169

Open
ppbrown opened this issue Nov 20, 2023 · 0 comments
Open

Callback for g-signin2 does not seem to get triggered #1169

ppbrown opened this issue Nov 20, 2023 · 0 comments

Comments

@ppbrown
Copy link

ppbrown commented Nov 20, 2023

I'm trying to use the exact stuff as written on
https://developers.google.com/identity/sign-in/web/sign-in

no matter what I've tried, the callback isnt getting triggered.
Yes I'm running it on a webserver.
Yes, the OAuth stuff IS getting trigered. If I deliberately put in a wrong clientID it complains.
But if I put in the right one., I see the auth popups pop up, and then... nothing.

What follows is my test code. Browser is Chrome Version 119.0.6045.160 (Official Build) (64-bit) on Windows

<!DOCTYPE html> <html> <head>
    <script>
    function f1() {
        console.log("f1");
        document.getElementById("statuslabel").innerHTML = "F1 Done";
    }
    </script>
    <script>
    function settext() {
        console.log("Stupid Button Press");
        document.getElementById("statuslabel").innerHTML = "ButtonClicked";
    }
    </script>
      <meta name="google-signin-client_id" content="CHANGE-ME.apps.googleusercontent.com">
      <script src="https://apis.google.com/js/platform.js" ></script>
  <h1>Button Change</h1>
 Demo test text
  <p id=statuslabel> Random test here
  <p> <button onclick="settext()">Click me for text toggle!</button>
  <p> <div class="g-signin2" data-onsuccess="f1()" data-theme="dark"></div>
  <p> <button onclick="f1()">Force F1</button>

</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant