Clear all auth cookies when API token refresh fails before redirecting to login

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
imacatandCodex committed 2026-03-08 19:29:04 +08:00
1 parent b53f58cb0c
commit 1670054356
2 files changed
+58

No files matched your search

+2
View File
@@ -88,6 +88,8 @@ apiClient.interceptors.response.use(
// Refresh failed: clear auth and redirect to login
deleteCookie("luciaToken");
deleteCookie("luciaRefreshToken");
deleteCookie("isLuciaLoggedIn");
window.location.href = "/login";
return Promise.reject(refreshError);
}