tnoodle icon indicating copy to clipboard operation
tnoodle copied to clipboard

Ignore blocked access to localStorage?

Open campos20 opened this issue 4 years ago • 0 comments

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.

campos20 avatar Nov 28 '20 22:11 campos20