From 81f51b69ecaaece7b87df4f4b94be1dc2c8b8a67 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Tue, 16 May 2017 17:13:19 +0700 Subject: [PATCH] Clear token before dispatching logout action --- client/coral-framework/actions/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-framework/actions/auth.js b/client/coral-framework/actions/auth.js index 03ab61c76..79fba460c 100644 --- a/client/coral-framework/actions/auth.js +++ b/client/coral-framework/actions/auth.js @@ -267,8 +267,8 @@ export const fetchForgotPassword = (email) => (dispatch) => { export const logout = () => (dispatch) => { return coralApi('/auth', {method: 'DELETE'}).then(() => { - dispatch({type: actions.LOGOUT}); Storage.removeItem('token'); + dispatch({type: actions.LOGOUT}); }); };