From 4e2ce3cdbba0d3e1db7b4bd3971daf0ae271fbfd Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 12 Dec 2017 12:15:55 -0500 Subject: [PATCH] Clear local storage when token expires --- src/utils/auth.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/auth.js b/src/utils/auth.js index 982a3ddf..57c301c3 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -150,6 +150,7 @@ export function hasOnePermission(desiredPermissions) { export function requireAuth(nextState, replace) { if (!Auth.isAuthenticated()) { + Auth.clearLocalStorage(); localStorage.desiredUrl = nextState.location.pathname; replace({ pathname: '/login', -- GitLab