16848: Resets extra cached token from the store when not valid anymore.
[arvados-workbench2.git] / src / store / auth / auth-reducer.ts
index 7459b7ac0c3a651e239a9b560baebd795d1884e0..b29cf3411a5650cc330ef0735a7fb768a95ade22 100644 (file)
@@ -69,6 +69,8 @@ export const authReducer = (services: ServiceRepository) => (state = initialStat
             }),
         SET_EXTRA_TOKEN: ({ extraApiToken, extraApiTokenExpiration }) =>
             ({ ...state, extraApiToken, extraApiTokenExpiration }),
+        RESET_EXTRA_TOKEN: () =>
+            ({ ...state, extraApiToken: undefined, extraApiTokenExpiration: undefined }),
         INIT_USER: ({ user, token, tokenExpiration }) =>
             ({ ...state,
                 user,