Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idpiframe_initialization_failed: Cookies are not enabled in current environment. #68

Open
erdseb opened this issue Aug 20, 2020 · 8 comments

Comments

@erdseb
Copy link

erdseb commented Aug 20, 2020

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:

chromium_success


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…


chromium_cookies


…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
@erdseb
Copy link
Author

erdseb commented Aug 25, 2020

Any thoughts?

@raxod502
Copy link

Unfortunately, Google appears to have no desire to fix the issue. See the disappointing discussion in google/google-api-javascript-client#260. The recommended solution is to stop using the Google API JavaScript client, and implement a server-side flow instead.

@MaisumAbbas
Copy link

This may help: https://stackoverflow.com/questions/63631849/google-sign-in-not-working-in-incognito-mode

@gabycperezdias
Copy link

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?

@shadow-identity
Copy link

@gabycperezdias I just logged with Google Identity to my local server in using this documentation: https://developers.google.com/identity/gsi/web/guides/overview

@gabycperezdias
Copy link

gabycperezdias commented Jan 15, 2022

@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...

@shadow-identity
Copy link

@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.

@gabycperezdias
Copy link

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants