fix : redirige sur le login sur une 401 et reset du auth state + doc + timeout du toaster

This commit is contained in:
tristan
2026-01-22 17:41:04 +01:00
parent 66e9c52914
commit 2cd05a39ba
5 changed files with 42 additions and 15 deletions
+5
View File
@@ -12,6 +12,11 @@ export const useAuthStore = defineStore('auth', {
isAuthenticated: (state) => Boolean(state.user)
},
actions: {
clearSession() {
this.user = null
this.checked = true
this.isLoading = false
},
async ensureSession() {
if (this.checked) {
return this.user