Closed ghengeveld closed 11 months ago
Let's do the equivalent of [AP-3255](https://linear.app/chromaui/issue/AP-3255/add-a-oauth-token-expiration-bandaid) in the VT addon. We can address [AP-3254](https://linear.app/chromaui/issue/AP-3254/public-api-tokens-expire-and-dont-get-refreshed) later.
Looks good although I have some questions. How to QA this?
@tmeasday I just manually messed up (edited) my JWT in localStorage to make it invalid.
Nice!
Clears the access token from memory and localStorage when either the token expires or the API returns either an auth error or no
viewer
data.I've updated our setup to use URQL's
authExchange
rather than our own custom header injection. This makes it a little more "intelligent" about not sending a request if we already know it will fail. It also is able to automatically retry a request after refreshing the token (e.g. using a refreshToken) but we don't have that capability yet.📦 Published PR as canary version:
0.0.88--canary.105.7ed4611.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/addon-visual-tests@0.0.88--canary.105.7ed4611.0 # or yarn add @chromaui/addon-visual-tests@0.0.88--canary.105.7ed4611.0 ```