Closed Chris-Bitler closed 1 year ago
This looks good, thanks for the PR. I've been wondering if this works or is better included in the background.js file.
@danreeves I got wrapped up in other stuff yesterday and forgot about making sure we only refresh it when necessary. Will fix it today
@danreeves What was the outcome of you leaving it open for a bit?
@Coconutcoo copy pasting some messages i put in discord:
i had it running in the background while i worked and sometimes it would get stuck on a loading spinner when i tabbed back. i think it's to do with the fetcher getting memoized. i did a little refactor on the branch locally so it pulls out of localStorage every time it tries to fetch and it appears to have resolved that.
opening the laptop again in the morning i got TypeError: Cannot read properties of undefined (reading 'ExpiresIn') in the background thread
Closing as stale. Feel free to re-open a PR if you make any more progress on it!
Automatically refresh the user authentication tokens on a 30 minute interval to make sure we don't start getting 401's for the store requests