Skip to content

Google-Auth(Google Identity) Blank popup #796

Closed
@ericel

Description

@ericel

Google Identity
Django

My Google Auth is Stuck in the popup auth flow. The one-tap authentication works just fine but not the button

. I click on it, the popup opens but that's it, it remains there blank with no progress, never closes or anything.

<script defer src="https://accounts.google.com/gsi/client" ></script>
<script>
   function handleCredentialResponse(response) {
     console.log("Encoded JWT ID token: " + response.credential);
     ...
    }
   window.onload = function () {
     google.accounts.id.initialize({
       client_id: "531144-------",
       callback: handleCredentialResponse
     });
     google.accounts.id.renderButton(
       document.getElementById("g_id_signin"),
       { theme: "outline", size: "large" }  // customization attributes
     );
     google.accounts.id.prompt(); // also display the One Tap dialog
   }
</script>
<div id="g_id_signin"></div>

I have all the domains, localhost added in Authorized redirect URIs and Redirects. But I still can't get the popup to populate and complete the authentication flow. Any help is appreciated.
Screen Shot 2022-03-07 at 8 06 48 PM

At this point the error I am getting in FIREFOX:

Uncaught TypeError: window.opener is null li https://ssl.gstatic.com/_/gsi/_/js/k=gsi.gsi.en.i....O/am=wg/d=1/rs=AF0...w/m=credential_page_library:291 mi https://ssl.gstatic.com/_/gsi/_/js/k=gsi.gsi.en.i.....O/am=wg/d=1/rs=AF0...w/m=credential_page_library:29

And in CHROME:

Uncaught TypeError: Cannot read properties of null (reading 'postMessage') at li (m=credential_page_library:291:151)

The problem seems to be this picker_popup in this line of code:
a,c);return b.g};li=function(a,b){"picker_popup"===a.i?window.opener.postMessage(b,a.j):window.parent.postMessage(b,a.j)};_.ni=function(a,b){var c=new _.Nd;a.g?(a.g.postMessage(b),c.resolve()):c.reject("Illegal state: try to send message before message channel set up.");return c.g};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions