Add google account without using iframe

I am trying to add Google Sign-in to my site following the official documentation . It works fine except when I select the "Block third party cookies and site data" option in Chrome settings

chrome: // settings / content

in this case a JavaScript error is generated with an error message

Uncaught SecurityError: Failed to read the 'sessionStorage' property  from 'Window': Access is denied for this document.

      

The error occurs in the iframe that the Google Auth API is trying to load for the login button.

Is there a way to make it work even if I keep the third party cookie option you choose ? Maybe there is a way to customize the google button so that it doesn't use an iframe? Quora seems to have a similar setup and they don't use iframe. How do they do it?

+3
javascript iframe google-api google-signin


source to share


No one has answered this question yet

Check out similar questions:

3915
Why does Google add while (1); into your JSON responses?
2302
Add table row in jQuery
2170
How can I change the url without reloading the page?
1898
$ (document). already equivalent without jQuery
960
How do I apply CSS to an iframe?
778
Is there a link to the "latest" jQuery library in the Google API?
763
jQuery / JavaScript: Accessing Iframe Content
197
Failed to load resource: net :: ERR_INSECURE_RESPONSE
31
Iframe in Chrome error: Uncaught SecurityError: Could not read sessionStorage property on 'Window'
1
LocalStorage not working in iframe in google chrome



All Articles
Loading...
X
Show
Funny
Dev
Pics