From eb6baf037bdc2020ea198f56fafed8dd4565a76d Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Tue, 14 Jul 2026 23:09:28 +0530 Subject: [PATCH] fix(admin-auth): route forgot-password calls through the gateway proxy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /api/auth/forgot-password and /api/auth/reset-password aren't routes this app serves itself — admin.nxtgauge.com only proxies specific prefixes (/api/admin/*, /api/gateway/*, /api/me/*), so calling the bare path 404'd at the SolidStart routing layer before ever reaching the backend. The existing /api/gateway/[...path] proxy already rewrites /auth/* to /api/auth/* on the real backend — route through that instead. Co-Authored-By: Claude Sonnet 5 --- src/routes/login.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/login.tsx b/src/routes/login.tsx index 92b96de..c931f46 100644 --- a/src/routes/login.tsx +++ b/src/routes/login.tsx @@ -91,7 +91,7 @@ export default function LoginPage() { const trimmedEmail = email().trim().toLowerCase(); setIsSubmitting(true); try { - const r = await fetch('/api/auth/forgot-password', { + const r = await fetch('/api/gateway/auth/forgot-password', { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, body: JSON.stringify({ email: trimmedEmail }), @@ -116,7 +116,7 @@ export default function LoginPage() { if (newPassword().trim() !== confirmPassword().trim()) { setError('Passwords do not match.'); return; } setIsSubmitting(true); try { - const r = await fetch('/api/auth/reset-password', { + const r = await fetch('/api/gateway/auth/reset-password', { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, body: JSON.stringify({ code: resetCode().trim(), new_password: newPassword().trim() }),