diff options
Diffstat (limited to 'thallium-frontend/src/store.ts')
-rw-r--r-- | thallium-frontend/src/store.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/thallium-frontend/src/store.ts b/thallium-frontend/src/store.ts index 96c4405..d9b4873 100644 --- a/thallium-frontend/src/store.ts +++ b/thallium-frontend/src/store.ts @@ -18,6 +18,7 @@ const found = localStorage.getItem("authorizationState"); let persistedState: RootState["authorization"] = { voucherToken: null, userToken: null, + refreshTask: null, }; if (found) { @@ -35,5 +36,9 @@ export type AppStore = ReturnType<typeof setupStore>; store.subscribe(() => { console.log("Serializing state to localStorage"); - localStorage.setItem("authorizationState", JSON.stringify(store.getState().authorization)); + const authState = store.getState().authorization; + localStorage.setItem("authorizationState", JSON.stringify({ + voucherToken: authState.voucherToken, + userToken: authState.userToken, + })); }); |