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

I have a react project in which I’m using @auth0/auth0-react for auth, and I’m using getAccessTokenSilently to retrieve the auth token. This works well, except for browsers that have third-party cookies disabled. When third party cookies are disabled, I can’t get past the login screen, and I see the below error message in Firefox. I think I must be missing something, and I would appreciate any advice.

Hi @jonathanbutler7

Thank you for posting your question on the community and I am sorry about the delayed reply to your inquiry!

Your issue seems to be cause due to the fact that the cookies that you are trying to set on the browser are considered to be third party cookies.

In order to avoid this issue, I would recommend to implement either a custom domain on your Auth0 tenant or implement refresh token/ refresh token rotation.

This should help you in handling the issue that you are experiencing if you still need assistance with it.

If you have any other questions, feel free to leave a reply or post again on the community!

Kind Regards,
Nik

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.