From f3f481fcf090ff9ea8a65fd1ef3b0c867eb14771 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 26 Feb 2018 22:58:29 +0100 Subject: [PATCH] Purge config.auth_token from redux on logout --- client/coral-framework/reducers/config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/coral-framework/reducers/config.js b/client/coral-framework/reducers/config.js index a3a0409eb..f7aebd9e2 100644 --- a/client/coral-framework/reducers/config.js +++ b/client/coral-framework/reducers/config.js @@ -1,9 +1,15 @@ import { MERGE_CONFIG } from '../constants/config'; +import { LOGOUT } from '../constants/auth'; const initialState = {}; export default function config(state = initialState, action) { switch (action.type) { + case LOGOUT: + return { + ...state, + auth_token: null, + }; case MERGE_CONFIG: return { ...state,