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

Ignore blocked access to localStorage? #633

Open
campos20 opened this issue Nov 28, 2020 · 0 comments
Open

Ignore blocked access to localStorage? #633

campos20 opened this issue Nov 28, 2020 · 0 comments

Comments

@campos20
Copy link
Member

Recently, 2009MARI03 reached us with an issue in which he was getting the following error

Javascript throws error: wca.api.js:37 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. which is this line: wcaAccessToken = localStorage[TNOODLE_ACCESS_TOKEN_KEY];

The issue was cause by a Chrome setting blocking cookies. Despite he fixed by allowing saving data, we could think about just ignoring errors like these.

Currently, we save token and environment in localStorage, 2 strings. The downside of not saving to localStorage is that logged user would need to log every single time. It's not a big deal since token expires in 2h and we have no refresh yet.

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

1 participant