diff --git a/src/reducers.js b/src/reducers.js index 35959fa2..8eeb97c7 100644 --- a/src/reducers.js +++ b/src/reducers.js @@ -15,6 +15,12 @@ const appReducer = combineReducers({ ...globalReducers, ...pageReducers }); const createReducer = () => { return (state, action) => { const appState = action.type === USER_LOGOUT ? undefined : state; + + // Clear sessionStorage when logging out. + if (action.type === USER_LOGOUT && typeof window !== 'undefined' && !!window.sessionStorage) { + window.sessionStorage.clear(); + } + return appReducer(appState, action); }; };