Google SSO Login error: “pop up closed by user” error: “idpiframe_initialization_failed”, details: “sessionStorage is not available in the current environment.”

Eke, Chinedu
1 min readMay 16, 2021

So you want to implement the Google SSO login and the authentication in your Application, It is my guess that you have,

gone to https://console.developers.google.com/

created your project and selected the project type,

retrieved your client ID

inserted your client ID (remember that this ID must not be shared with anyone) in your code base and

wrote a function that checks for implementation success or failure in the browser console, and feeling very confident that you’d be greeted with the success instruction you have written because you are amazing but to your dismay, you find this error “pop up closed by user” in your console.

Don’t panic, well, you can panic a little, you are human.

Chrome, like Edge, blocks all third-party cookies by default.

Yup! that’s the cause of your trouble.

So as you’d guess, the solution is to go to your browser settings, clear all cache and cookies, and disable the setting that blocks third party cookies, refresh, and regain your smile.

Note here, this hack just to be sure your Google SSO integration was done properly. So moving forward, you can call google APIs (validate google account) at your backend and this issue will not occur at the backend.

Why?

because you won’t want to go about asking your customers to enable third party cookies in their browser and detailing how they’d also need to clear their cookies and cache.

Hopefully, this helps someone.

Feel free to reach out to me.

--

--