diff --git a/src/utils/auth.js b/src/utils/auth.js index 982a3ddf2793ce9b89e0f3304cf4ea8423b577cd..57c301c3cf765b41e93192eb028ff020ecdd8125 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',