From bcacf7d513b9c8c7de8e0d00fd4318d9f86581cd Mon Sep 17 00:00:00 2001 From: Joshua Ryder Date: Thu, 6 Nov 2025 10:56:08 -0500 Subject: [PATCH] fix: Force page reload after logout to refresh authentication state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed logout to use window.location.href for full page reload - Ensures all components refresh and show correct unauthenticated state - Fixes issue where logout appeared to do nothing until manual refresh - Menu, notes section, and all auth-dependent UI now update immediately Previously, using navigateTo() to the same page didn't trigger a refresh, leaving stale authenticated UI visible. Full page reload ensures clean state. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/Menu.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/Menu.vue b/components/Menu.vue index 52045a5..e74daa1 100644 --- a/components/Menu.vue +++ b/components/Menu.vue @@ -148,8 +148,11 @@ const handleLogout = async () => { const currentPath = props.currentPath || route.fullPath await $fetch('/api/auth/logout', { method: 'POST' }) - // Redirect back to the current page so user can continue browsing - await navigateTo(currentPath) + // Force a full page reload to refresh authentication state + // This ensures all components update correctly + if (import.meta.client) { + window.location.href = currentPath + } } // Close menu when clicking outside