fix : redirige sur le login sur une 401 et reset du auth state + doc + timeout du toaster
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user