From 532f0039d59c3306ccb5a64fded5a021d4322506 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 9 Jan 2026 15:01:33 +0200 Subject: [PATCH] merge dev --- surfsense_web/components/TokenHandler.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/surfsense_web/components/TokenHandler.tsx b/surfsense_web/components/TokenHandler.tsx index 24260f485..b4ca36298 100644 --- a/surfsense_web/components/TokenHandler.tsx +++ b/surfsense_web/components/TokenHandler.tsx @@ -45,7 +45,7 @@ const TokenHandler = ({ } // Clear the flag for future logins sessionStorage.removeItem("login_success_tracked"); - + // Store token in localStorage using both methods for compatibility localStorage.setItem(storageKey, token); setBearerToken(token); @@ -56,7 +56,7 @@ const TokenHandler = ({ // Use the saved path if available, otherwise use the default redirectPath const finalRedirectPath = savedRedirectPath || redirectPath; - // Use hard navigation to clear all React/jotai state from previous session + // Redirect to the appropriate path window.location.href = finalRedirectPath; } catch (error) { console.error("Error storing token in localStorage:", error);