diff --git a/src/auth/index.js b/src/auth/index.js index 24ab1fe..321ffa2 100644 --- a/src/auth/index.js +++ b/src/auth/index.js @@ -1,13 +1,13 @@ const DEFAULT_TOKEN_KEY = '__vue-design-pro__' export function setTokenToLocal ({ key = DEFAULT_TOKEN_KEY, token }) { - localStorage.setItem(key, token) + sessionStorage.setItem(key, token) } export function getTokenFromLocal (key = DEFAULT_TOKEN_KEY) { - localStorage.getItem(key) + sessionStorage.getItem(key) } export function removeToken (key = DEFAULT_TOKEN_KEY) { - localStorage.removeItem(key) + sessionStorage.removeItem(key) }