Messenger/packages/backend
Заид Омар Медхат | Zaid Omar Medhat 71e39c7e88 Fix refresh-token rotation race that logged users out
Two concurrent refresh calls (double-mounted bootstrap effect, second tab)
replayed the same cookie; the loser tripped reuse detection and revoked the
whole token family, forcing re-login.

- Client: single-flight /auth/refresh — concurrent callers share one request.
- Server: 30s grace window for a just-rotated token, but only while the
  family still has a live successor, so theft detection still kills a
  genuinely compromised family and logout stays final.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFRyKxkKEjfAgpXygzoNiD
2026-07-11 01:53:04 +05:00
..
migrations Phase 6.5: notifications service + in-app toasts; in-app voice/video messages; SVG icons 2026-07-10 19:05:39 +05:00
src Fix refresh-token rotation race that logged users out 2026-07-11 01:53:04 +05:00
.dockerignore init 2026-07-10 13:31:12 +05:00
Dockerfile init 2026-07-10 13:31:12 +05:00
eslint.config.mjs auth 2026-07-10 14:16:10 +05:00
package.json Phase 6.5: notifications service + in-app toasts; in-app voice/video messages; SVG icons 2026-07-10 19:05:39 +05:00
tsconfig.json init 2026-07-10 13:31:12 +05:00
tsup.config.ts Phase 6.5: notifications service + in-app toasts; in-app voice/video messages; SVG icons 2026-07-10 19:05:39 +05:00