From 4f31275c824bfc45a855450c9e207175aff04e46 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Tue, 14 Apr 2026 22:55:05 +0200 Subject: [PATCH] fix(auth): redirect to login immediately on logout Replace toast-only onSuccess with window.location.href redirect to /login, which also cleanly resets all React state and caches. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/main/src/hooks/auth.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/main/src/hooks/auth.ts b/apps/main/src/hooks/auth.ts index 5ddb847..fdc6856 100644 --- a/apps/main/src/hooks/auth.ts +++ b/apps/main/src/hooks/auth.ts @@ -259,11 +259,7 @@ export function useLogout() { queryClient.removeQueries(); }, onSuccess: () => { - toast.add({ - title: "Déconnexion réussie", - description: "Vous avez été déconnecté avec succès", - type: "success", - }); + window.location.href = "/login"; }, onError: (error) => { toast.add({