fix: JWT not persisting after reboot

This commit is contained in:
LukeGus
2025-10-31 17:48:18 -05:00
parent 6125ba4931
commit 5c7cc078ad
7 changed files with 177 additions and 113 deletions

View File

@@ -310,6 +310,10 @@ function createApiInstance(
if (isSessionExpired && typeof window !== "undefined") {
console.warn("Session expired - please log in again");
// Clear the JWT cookie to prevent reload loop
document.cookie =
"jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
import("sonner").then(({ toast }) => {
toast.warning("Session expired - please log in again");
});