Skip to content

fix(auth): add single-flight token refresh handling and cross-tab sync ($35 Bounty) - #17

Open
qkikasq wants to merge 1 commit into
shaiananvari8:mainfrom
qkikasq:fix/single-flight-token-refresh
Open

fix(auth): add single-flight token refresh handling and cross-tab sync ($35 Bounty)#17
qkikasq wants to merge 1 commit into
shaiananvari8:mainfrom
qkikasq:fix/single-flight-token-refresh

Conversation

@qkikasq

@qkikasq qkikasq commented Sep 1, 2026

Copy link
Copy Markdown

Closes #1

Problem

Concurrent token refresh requests could overlap and cause stale token writes and inconsistent session states.

Solution

  • Added single-flight refresh coordination via SingleFlightAuthManager.
  • Coalesces in-flight refresh calls so all concurrent requests await the same promise.
  • Propagates success and failure across tabs using safe BroadcastChannel messaging without logging sensitive raw tokens.
  • Fully clears in-flight marker on failure so subsequent retries proceed normally.
  • Added comprehensive deterministic validation tests.

…resh handling and cross-tab sync ($35 Bounty)
@qkikasq

qkikasq commented Sep 1, 2026

Copy link
Copy Markdown
Author

Bounty Payout Details

  • Developer / GitHub: @qkikasq
  • Preferred Payout Rails:
    • USDT (TRC-20) / TON: Available via Telegram @wallet (TG: @rqfiw)
    • Revolut / SEPA EUR: Available upon merge confirmation.

PR is fully validated and ready for review.

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.

[$35 BOUNTY] [TypeScript] Add single-flight token refresh handling

1 participant