You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
299 B
TypeScript
10 lines
299 B
TypeScript
const TokenKey = 'Admin-Token';
|
|
|
|
const tokenStorage = useStorage<null | string>(TokenKey, null);
|
|
|
|
export const getToken = () => tokenStorage.value;
|
|
|
|
export const setToken = (access_token: string) => (tokenStorage.value = access_token);
|
|
|
|
export const removeToken = () => (tokenStorage.value = null);
|