fix(admin-auth): route forgot-password calls through the gateway proxy
All checks were successful
build-and-release / build (push) Successful in 49s

/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 <noreply@anthropic.com>
This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-14 23:09:28 +05:30
parent 812fc5ef04
commit eb6baf037b

View file

@ -91,7 +91,7 @@ export default function LoginPage() {
const trimmedEmail = email().trim().toLowerCase(); const trimmedEmail = email().trim().toLowerCase();
setIsSubmitting(true); setIsSubmitting(true);
try { try {
const r = await fetch('/api/auth/forgot-password', { const r = await fetch('/api/gateway/auth/forgot-password', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
body: JSON.stringify({ email: trimmedEmail }), body: JSON.stringify({ email: trimmedEmail }),
@ -116,7 +116,7 @@ export default function LoginPage() {
if (newPassword().trim() !== confirmPassword().trim()) { setError('Passwords do not match.'); return; } if (newPassword().trim() !== confirmPassword().trim()) { setError('Passwords do not match.'); return; }
setIsSubmitting(true); setIsSubmitting(true);
try { try {
const r = await fetch('/api/auth/reset-password', { const r = await fetch('/api/gateway/auth/reset-password', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
body: JSON.stringify({ code: resetCode().trim(), new_password: newPassword().trim() }), body: JSON.stringify({ code: resetCode().trim(), new_password: newPassword().trim() }),