Join our Newsletter — 33% off our NHI Course
Home FAQ Authentication, Authorisation & Trust Why do concurrent OAuth refreshes sometimes disconnect users…
Authentication, Authorisation & Trust

Why do concurrent OAuth refreshes sometimes disconnect users instead of just causing a retry?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 6, 2026 Domain: Authentication, Authorisation & Trust

Because some providers treat refresh token reuse as replay, not simple contention. If one worker refreshes and rotates the token, a second worker presenting the old token can trigger compromise handling, which revokes the active refresh token family and related access tokens. The visible result is a forced re-authorization, even when the second call came from your own race condition.

Why concurrent refresh token use is treated as a trust problem, not just a timing problem

Concurrent refreshes fail because many OAuth implementations are designed to protect the refresh token family, not merely to satisfy a request. When a rotated token is presented twice, the provider may interpret that as replay or token theft and respond by invalidating the whole chain. That makes the user experience look like an unexpected disconnect, but the underlying logic is defensive containment. For teams building background jobs, mobile clients, or multi-worker APIs, the important distinction is that token rotation changes the security state, not just the expiry state.

Standards guidance on access control and token lifecycle is relevant here, including NIST SP 800-53 Rev 5 Security and Privacy Controls, because the issue is about preserving trust in an authenticated session after a suspicious reuse signal. In practice, many engineering teams discover this only after a rare race condition has already forced a user back through sign-in.

What actually happens when two refreshes overlap

Most modern providers use refresh token rotation so that each successful refresh returns a new token and retires the previous one. That design reduces the value of a stolen token, but it also means the client must treat refresh as a critical section. If two workers read the same stored token and refresh at nearly the same time, one request usually wins and receives the replacement token. The other request arrives with a token that is now stale.

What happens next depends on the provider’s compromise policy. Some providers allow a small amount of token reuse tolerance, but many do not. If reuse is interpreted as replay, the system may revoke the current refresh token family and any access tokens still tied to it. The user is then pushed into full re-authentication rather than a simple retry loop.

  • Single-threaded clients usually see this less often because only one refresh path exists.
  • Distributed clients are more exposed because caches, retries, and parallel workers can all hold the same refresh token briefly.
  • Short token lifetimes increase the frequency of refresh events, which increases the chance of a race.
  • Fail-open retry logic can make the problem worse if it replays a stale token after the first refresh already succeeded.

The practical boundary is simple: once the provider has rotated the token, the old one may no longer represent a valid retry target, so the client cannot assume refresh is idempotent.

Where the edge cases and trade-offs show up

Tighter refresh-token protection often increases operational friction, because it gives defenders a clearer way to detect replay while making client coordination more important. That trade-off is acceptable when the provider treats reuse as a sign of compromise, but it can surprise teams that expected the auth layer to behave like a normal retryable API.

There is also a genuine implementation difference across providers. Some rotate on every refresh and revoke on any reuse; others permit a narrow grace window; a few rely on narrower session controls and are less aggressive. That variation matters because the same application code can behave acceptably in one environment and trigger forced sign-out in another. The safest assumption is that refresh tokens should be handled as one-time use credentials unless the provider explicitly documents otherwise.

Concurrency bugs also appear in less obvious places: background refresh daemons, tabbed browser sessions, mobile app resume events, and horizontally scaled API gateways can all create duplicate refresh attempts. The guidance breaks down when the client cannot serialize access to the token or cannot reliably propagate the newly issued token to every worker before the old one is reused.

Risk and Threat Considerations

The material risk is refresh token replay and trust boundary collapse. When a provider cannot distinguish a benign race from a stolen token being replayed, it may choose containment over convenience and invalidate the full session chain. That protects the account, but it also means a local concurrency defect can mimic an intrusion signal.

Failure mechanism: one actor refreshes and rotates the token, while a second actor presents the prior token after it has been retired. If the provider’s detection logic treats reuse as suspicious, the system responds by revoking the token family, which also removes the user’s active authenticated state.

Impact: users are disconnected, background jobs lose authorization, and retry logic can loop into repeated reauthentication failures until the client stops reusing stale credentials or serializes refresh correctly.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v86.3 — Access Control ManagementConcurrent refreshes affect session and credential use control.
Recommendation — Serialize refresh-token use and revoke stale credentials promptly.
NIST CSF 2.0PR.AA-5 — AuthenticationThe issue is about maintaining authenticated access during token rotation.
PR.AC-1 — Identity and Access ManagementRefresh-token reuse changes access state and session continuity.
Recommendation — Implement token-handling rules that prevent stale credentials from reauthenticating. Control session ownership so only one actor can refresh a given identity at a time.
OWASP Non-Human Identity Top 10NHI-01 — Inventory and OwnershipRefresh tokens are machine-held credentials that need clear ownership.
NHI-03 — Secrets and Credential ManagementRefresh tokens behave like sensitive machine credentials with rotation and revocation needs.
Recommendation — Assign each refresh credential a single owner and revoke it on handoff or loss. Rotate refresh credentials carefully and prevent reuse of retired tokens.

Practitioner Guidance

What to verify: confirm whether the provider’s refresh flow is one-time use, whether reuse triggers family revocation, and whether there is any documented grace window. Treat those rules as part of the client contract, not as an implementation detail.

Decision rule: if more than one worker can refresh the same subject at once, serialize refresh behind a single owner or shared lock; if you cannot do that reliably, design for forced re-authentication as the safe fallback rather than assuming retries will succeed.

Common mistake: storing the new token after the refresh succeeds but before every parallel worker has stopped using the old one. That creates the exact race that turns a harmless overlap into a session-wide logout.

Practitioner takeaway: refresh-token races are usually a coordination problem only until the provider interprets them as replay, at which point they become a security event with user-visible recovery cost.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 6, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org