Skip to content

fix: add missing Vite proxy entries for auth, users, history, debug routes - #11

Merged
AhmadHammad21 merged 8 commits into
mainfrom
debug/auth-not-working
May 9, 2026
Merged

AhmadHammad21 merged 8 commits into
mainfrom
debug/auth-not-working

Conversation

@AhmadHammad21

Copy link
Copy Markdown
Owner

Summary

  • Adds missing Vite dev-server proxy entries for /auth, /users, /history, and /debug routes
  • Without these, fetch('/auth/status') in the Vite dev server returned <!DOCTYPE html> (SPA fallback) instead of JSON, causing authRequired to stay false and the app to appear always-logged-in

Root cause

vite.config.ts only proxied /chat, /sessions, and /stats. The new RBAC routes (/auth, /users) and existing routes (/history, /debug) were missing, so all API calls to those paths during npm run dev hit the Vite SPA fallback instead of FastAPI.

Test plan

  • Run npm run dev and navigate to the app
  • Confirm login page appears when JWT_SECRET is set in .env
  • Register first user → verify they get admin role
  • Login → verify redirect to chat
  • Logout → verify redirect to login

@AhmadHammad21
AhmadHammad21 merged commit d5ffd1c into main May 9, 2026
2 checks passed
@AhmadHammad21
AhmadHammad21 deleted the debug/auth-not-working branch May 9, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant