File size: 404 Bytes
95d29a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
let token: string | null = null;
export const getAuthCode = () => {
if (token !== null) {
return token;
}
token = window.localStorage.getItem('authCode');
return token;
};
export const setAuthCode = (authCode: string | null) => {
token = authCode;
if (!authCode) {
window.localStorage.removeItem('authCode');
return;
}
window.localStorage.setItem('authCode', authCode);
};
|