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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user