browser-samples
browser-samples copied to clipboard
idpiframe_initialization_failed: Cookies are not enabled in current environment.
I'm running sample https://github.com/gsuitedevs/browser-samples/blob/master/drive/quickstart/index.html with Client and API ID filled in.
Expected Behavior
- a) An entry in "troobleshooting" that helps me understand what to do and if the fault is mine or not
- b) That the example works out of the box and displays something like this:
Actual Behavior
I see nothing but this text in the browser:
Drive API Quickstart
{
"error": "idpiframe_initialization_failed",
"details": "Cookies are not enabled in current environment."
}
I have checked the troubleshooting hints at https://github.com/gsuitedevs/browser-samples/blob/master/README.md#troubleshooting but case Cookies are not enabled in current environment.
is not listed. Also, I have not disabled anything about cookies manually, so a need to start Googling what to do.
It turns out I need to disable Block third-party cookies
here…
…that seems to be enabled by default, which seems right to me. I'd frankly rather not disable it — why does Google Drive force me to do that?
JavaScript Console Output
There was no output on the console
Specifications
- Browser (Chrome/Internet Explorer/Firefox): Chromium 83.0.4103.116 from Debian
- OS (Mac/Linux/Windows): Debian bullseye
Any thoughts?
Unfortunately, Google appears to have no desire to fix the issue. See the disappointing discussion in https://github.com/google/google-api-javascript-client/issues/260. The recommended solution is to stop using the Google API JavaScript client, and implement a server-side flow instead.
This may help: https://stackoverflow.com/questions/63631849/google-sign-in-not-working-in-incognito-mode
Hi :)
I understand google is not exactly interested in fixing this, but they released a new Google Identity Service for signin.... any idea if this new process fixes this issue, and if so, how to integrate both?
@gabycperezdias I just logged with Google Identity to my local server in using this documentation: https://developers.google.com/identity/gsi/web/guides/overview
@shadow-identity I was able to login as well on normal tabs + third-party cookies enabled, but how to get an auth token to make the gpicker to work for example? I got the JWT, I worked with that, but there are no auth token to be passed to the picker... not only that, but turning off third-party cookies still breaks the new login for me...
@gabycperezdias I'm sorry I misled you. Seems like new Google Identity API currently works only for authentication purposes. I also didn't find any way to pass auth from google.auth go gapi instance. Seems like we just have to wait for Google to adapt its API to the new authorization procedure. Funny that the old one (with gapi.client etc) is already marked as deprecated, although there are no alternatives to using it for gapi.
@shadow-identity I created this issue with google https://issuetracker.google.com/issues/209651857 but I think they are ignoring me after the last interaction...