Fix: Redirect to /login after logout
This commit is contained in:
@@ -49,6 +49,7 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
token.value = null
|
token.value = null
|
||||||
user.value = null
|
user.value = null
|
||||||
localStorage.removeItem('access_token')
|
localStorage.removeItem('access_token')
|
||||||
|
router.push('/login')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize user on store creation if token exists
|
// Initialize user on store creation if token exists
|
||||||
|
|||||||
Reference in New Issue
Block a user