BillTracker/client
null 9efa74e12b fix(client): redirect to login when the session expires mid-use
useAuth only checked /auth/me on mount, so a session that expired later left
the app half-alive: mutations failed with raw 401 toasts and no way back to
login. api.ts now dispatches 'auth:expired' on any 401 outside /auth/*
(under /auth/* a 401 means wrong credential input — e.g. change-password —
and must not log the user out); AuthProvider listens and clears the user, so
the existing RequireAuth redirect kicks in preserving state.from.

Test: client/api.sessionExpiry.test.ts (both directions).

(QA follow-up 1e, error-handling audit)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 16:33:01 -05:00
..
components style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
contexts style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
hooks fix(client): redirect to login when the session expires mid-use 2026-07-10 16:33:01 -05:00
lib style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
pages style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
public Add complete brand asset pack 2026-07-06 12:54:29 -05:00
App.tsx style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
api.sessionExpiry.test.ts fix(client): redirect to login when the session expires mid-use 2026-07-10 16:33:01 -05:00
api.ts fix(client): redirect to login when the session expires mid-use 2026-07-10 16:33:01 -05:00
index.css style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
main.tsx style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
types.ts style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00