auth-fixes #12

Merged
aetos merged 8 commits from auth-fixes into main 2026-07-19 14:47:30 +00:00

8 Commits

Author SHA1 Message Date
4cabe0be0c fix: replace nested Routes with useLocation, remove pushState+reload, add debug logs
- ProfileRoutes: removed nested <Routes> in favor of useLocation()/useNavigate()
  with strict allowlist for /profile/me and /profile/me/edit
- ProfileComponentWrapper: replaced pushState()+reload() with navigate()
- useApi: log 401 and non-401 errors
- contexts.tsx: log fetchCurrentUser lifecycle and auth:unauthorized events
- axios.ts: log auth server 401s
2026-07-19 18:12:48 +05:30
77db5e1f05 pass onUnauthorized to AuthProvider instead of separate event listener 2026-07-19 03:18:36 +05:30
d2347de932 redirect to login on auth:unauthorized event from AppContent 2026-07-19 03:12:35 +05:30
1a8f98d4a2 move BrowserRouter above AppProvider, wire onUnauthorized redirect to /login 2026-07-19 01:04:42 +05:30
804617ff27 update .run configs to point at khata-ui package.json 2026-07-18 20:20:22 +05:30
00dd507fc4 wire spec-driven auth: remove VITE_AUTH_BASE_URL, reorder providers
- main.jsx: remove VITE_AUTH_BASE_URL env var; add AppContent that
  reads authConfig from useAppContext() and passes to AuthProvider;
  reorder: AppProvider -> AuthProvider -> BrowserRouter
- sync react-openapi: AuthConfig type, extractAuthConfig, loading fix
- sync react-auth: authConfig prop, config-driven paths, server logout
2026-07-18 19:48:47 +05:30
e87a2d55ab fixes 2026-07-18 13:52:52 +05:30
5d34c51e98 wire profile components, login/register routes, spec-driven auth
- src/main.jsx: add /login, /register, /profile/* routes; wire
  profileComponents from react-auth; pass basePath to Admin
- src/Header.tsx: profile button nav to /profile/me; Login to /login
- src/openapi-config.ts: wire getToken and profileComponents
- react-auth local: sync ProfileCreate, ProfileEdit, ProfileView
- react-openapi local: sync all auth + x-profile changes
  (AppProvider, Admin, ProfileRoutes, SideMenu, types, hooks, etc.)
2026-07-17 21:00:47 +05:30