mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-28 02:18:08 -05:00
fix: reset throttle on logout so checkAuth clears auth state
logout() calls checkAuth() to clear the authenticated flag and user info. But since checkAuth() likely ran within the last minute (on the navigation that triggered logout), the now-working throttle would return early, leaving authenticated=true in the store despite the token being removed. This could cause Login.vue to redirect back to home. Resetting lastUserInfoRefresh to null before checkAuth() ensures the logout flow always runs fully.
This commit is contained in:
@@ -452,6 +452,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
removeToken()
|
||||
const loggedInVia = getLoggedInVia()
|
||||
window.localStorage.clear() // Clear all settings and history we might have saved in local storage.
|
||||
lastUserInfoRefresh.value = null
|
||||
await router.push({name: 'user.login'})
|
||||
await checkAuth()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user