BillTracker/client
null 2a07e762a2 fix: four review-confirmed regressions in auth + OIDC flows
All found by the multi-angle /code-review over the branch and verified
against the installed libraries:

- 401 discriminator: the session-expiry redirect keyed off a path prefix
  (!/auth/*) and falsely logged users out on /profile/change-password
  with a wrong current password. requireAuth's no-session 401 now carries
  the distinct AUTH_REQUIRED code — the only signal api.ts dispatches
  auth:expired on; wrong-credential 401s keep AUTH_ERROR on any path.
  Test updated to pin the code-based contract on both directions.
- OIDC RFC 9207: exchangeAndVerifyTokens rebuilt the callback URL with
  only code+state, dropping the iss parameter openid-client v6 validates
  when the provider advertises support (authentik does) — every OIDC
  login would fail post-upgrade. The full callback query is now forwarded.
- OIDC http issuers: v6 enforces HTTPS on discovery/endpoints (v5
  didn't) — breaking internal http:// providers on Docker networks.
  OIDC_ALLOW_INSECURE_HTTP=true opts back in (documented in .env.example).
- 2FA downgrade: authService's webauthn fallback caught ANY challenge
  error and silently downgraded to password-only login; now only the
  stale-flag 'No registered WebAuthn credentials' case falls through,
  everything else rethrows.
- Burned-challenge retry: the server consumes the single-use 2FA
  challenge before verifying (anti-replay), so after a server rejection
  a retry can only ever return 'Challenge expired'. LoginPage now resets
  to sign-in on server failure (WebAuthn AND the pre-existing TOTP trap);
  a browser-prompt cancel keeps retry (token still live). Also lazy-loads
  @simplewebauthn/browser out of the entry bundle, matching ProfilePage.

Server 252/252, client 52/52, OIDC smoke 44/44, probe 33/33, e2e 27.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 22:57:07 -05:00
..
components fix(ui): restore row-status tints lost in the tailwind 4 codemod 2026-07-10 22:49:35 -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 fix(ui): restore row-status tints lost in the tailwind 4 codemod 2026-07-10 22:49:35 -05:00
pages fix: four review-confirmed regressions in auth + OIDC flows 2026-07-10 22:57:07 -05:00
public Polish product artwork and branding 2026-07-10 19:10:42 -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: four review-confirmed regressions in auth + OIDC flows 2026-07-10 22:57:07 -05:00
api.ts fix: four review-confirmed regressions in auth + OIDC flows 2026-07-10 22:57:07 -05:00
index.css Polish brand presentation 2026-07-10 19:49:20 -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