diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts index 1ec28bf..893e86e 100644 --- a/web/src/lib/api.ts +++ b/web/src/lib/api.ts @@ -145,8 +145,7 @@ class ApiClient { // Keep failed login attempts on the same page. // Only force logout for JWT-protected API v1 requests. if (isV1APIRequest && !isLoginRequest && !isLoginPage) { - // Token expired or invalid, clear auth and redirect. - //this.clearAuth(); + this.clearAuth(); window.location.href = LOGIN_UI_PATH; } } diff --git a/web/src/pages/LoginPage.tsx b/web/src/pages/LoginPage.tsx index c5d2f11..5b6f761 100644 --- a/web/src/pages/LoginPage.tsx +++ b/web/src/pages/LoginPage.tsx @@ -34,7 +34,7 @@ export default function LoginPage() { message: 'Welcome back!', color: 'green', }); - navigate('/'); + navigate('/dashboard'); } catch (err: any) { const responseData = err?.response?.data; const notificationMessage =