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

BUG: cannot login if localstorage / sessionstorage (privacy) was disabled on Chrome #14

Closed
adrienjoly opened this issue Jan 4, 2017 · 4 comments
Labels

Comments

@adrienjoly
Copy link
Owner

adrienjoly commented Jan 4, 2017

identified from https://js-code.herokuapp.com (js qcm 5) by alexandre blanc.

cause:

when localstorage was disabled by the user on Chrome, the google-signin element fails to load:

644096210-idpiframe.js:12 Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.(…)

image

same problem cited there:

solutions:

  1. re-enable localstorage on Chrome: http://stackoverflow.com/questions/24456891/iframe-in-chrome-error-uncaught-securityerror-failed-to-read-the-sessionstora

  2. add accounts.google.com to exception list: Disabling third party cookies causes silent failure GoogleWebComponents/google-signin#99 (instructions en français)

@adrienjoly adrienjoly added the bug label Jan 16, 2017
@adrienjoly
Copy link
Owner Author

adrienjoly commented Jan 17, 2017

for reference, full error:

Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
    at x.C (https://ssl.gstatic.com/accounts/o/1921062015-idpiframe.js:12:285)
    at Object.k.ub (https://ssl.gstatic.com/accounts/o/1921062015-idpiframe.js:8:121)
    at S.h.start (https://ssl.gstatic.com/accounts/o/1921062015-idpiframe.js:50:170)
    at Object.Bb [as startIdpIFrame] (https://ssl.gstatic.com/accounts/o/1921062015-idpiframe.js:84:713)
    at https://accounts.google.com/o/oauth2/iframe:1:414

@adrienjoly
Copy link
Owner Author

adrienjoly commented Jan 17, 2017

Behavior tests:

  • Block sites alone => console error + google warns that cookies are disabled
  • Block 3rd-party cookies alone => console.error + google login silently fails ⚠️
  • whitelist accounts.google.com +Block sites => works without error √
  • whitelist accounts.google.com +Block 3rd-party cookies => works without error √

@adrienjoly
Copy link
Owner Author

GoogleWebComponents/google-signin#99 (comment) => suggestion: have a timeout display a message to the user, after a few seconds without successful login.

@adrienjoly
Copy link
Owner Author

Closing in favor of #58.

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

No branches or pull requests

1 participant