Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
See original GitHub issueWe are using @auth0/auth0-spa-js 1.12.0 and recently see errors like this one:
Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
at Object.get (node_modules/@auth0/auth0-spa-js/dist/../src/storage.ts:88:18)
at new e2 (node_modules/@auth0/auth0-spa-js/dist/../src/transaction-manager.ts:18:36)
at new e2 (node_modules/@auth0/auth0-spa-js/dist/../src/Auth0Client.ts:155:30)
at init6 (packages/lib.web.auth/index.ts:81:20)
...
Because of this error, it is not possible to create a Auth0Client instance and therefore the affected users can not authenticate.
Unfortunately we were not able to reproduce the error yet. All we know is, that the userAgent is always “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.70” indicating an Edge 85 browser running on Windows 10.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Iframe in Chrome error: Uncaught SecurityError: Failed to read ...
Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
Read more >DOM error Failed to read the 'sessionStorage' property from ...
Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. at HTMLDocument.
Read more >Failed to read the 'localStorage' property from 'Window'
Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. ... This exception is thrown when the...
Read more >Uncaught DOMException: Failed to read the ... - Google Groups
Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. 813 views.
Read more >I see Failed to read the 'localStorage' property from 'Window ...
To fix this, you need to change the cookies' settings in your browser. To do this go to Settings > Privacy and security...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s still not working with an iframe and blocked third-party cookies. Is there any way to force client initialization to use memory storage or something else to avoid this issue?
Just for information: If you have third party cookies disabled in Chrome and include a website using
auth0-spa-jsin an iframe, this error also occurs. Not for the same website if you directly view it in the browser without putting it into an iframe.