forked from linkong/planet
release: bump version to 0.71.1
This commit is contained in:
1 parent
899e3bce43
commit
3265d22af5
26 files changed
+1052
-71
No files matched your search
@@ -37,17 +37,14 @@ export const useAuthStore = create<AuthState>()(
|
||||
const { access_token, user } = response.data
|
||||
set({ token: access_token, user })
|
||||
axios.defaults.headers.common['Authorization'] = `Bearer ${access_token}`
|
||||
console.log('[Auth] Logged in, token:', access_token.substring(0, 30) + '...')
|
||||
},
|
||||
|
||||
logout() {
|
||||
console.log('[Auth] Logging out...')
|
||||
set({ token: null, user: null })
|
||||
delete axios.defaults.headers.common['Authorization']
|
||||
},
|
||||
|
||||
clearAuth() {
|
||||
console.log('[Auth] Clearing all auth data...')
|
||||
set({ token: null, user: null })
|
||||
localStorage.removeItem('auth-storage')
|
||||
delete axios.defaults.headers.common['Authorization']
|
||||
|
||||
Reference in new issue
Block a user