init
This commit is contained in:
12
src/store/modules/auth/shared.ts
Normal file
12
src/store/modules/auth/shared.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { localStg } from '@/utils/storage';
|
||||
|
||||
/** Get token */
|
||||
export function getToken() {
|
||||
return localStg.get('token') || '';
|
||||
}
|
||||
|
||||
/** Clear auth storage */
|
||||
export function clearAuthStorage() {
|
||||
localStg.remove('token');
|
||||
localStg.remove('refreshToken');
|
||||
}
|
||||
Reference in New Issue
Block a user