Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Sign-in does nothing when 3rd party cookies are disabled

I am using the Google Sign-in Javascript library on my web page that runs on Python on Google App Engine. Everything works fine, unless the user has 3rd party cookies disabled (in Chrome). The signup does open the account chooser (if applicable) and asks for permissions, however after that nothing happens.

On desktop it returns to the signup page and shows following error in the console:

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

However I can't detect this error so I can't respond to it either. On mobile, it just gets stuck on a white page. The additional issue here is that since I am asking for offline access, the first signup returns a refresh_token. Due to this error, I never receive this refresh_token.

The error mentioned above shows immediately when I load the page. I would like to detect this, so that I can decide not to show the button and ask the user to enable 3rd party cookies.

like image 756
Vincent Avatar asked Oct 13 '15 14:10

Vincent


People also ask

What happens when third-party cookies are disabled?

Blocking third-party cookies does not create login issues on websites (which can be an issue after blocking first-party cookies) and may result in seeing fewer ads on the internet. However, blocking all cookies can sometimes lead to problems, as some websites rely on first-party cookies to function properly.

Does Google block third-party cookies?

Yes, third-party cookies are on their way out – multiple browsers have been blocking them for years, and Google Chrome's support of third-party cookies will stop by the end of 2024, as part of their larger Privacy Sandbox strategy.


1 Answers

Instead of depending on Google Signin library, you can test if third party cookies are disabled by youself, like: http://blog.jgc.org/2006/04/do-you-have-third-party-cookies.html

like image 92
Guibin Avatar answered Sep 26 '22 15:09

Guibin