{"version":"2.1.211","anchor":"oauth-refresh-lock-named-error-compromise-detection-and-long","canonical_anchor":"oauth-refresh-lock-named-error-compromise-detection-and-long","heading":"OAuth Refresh Lock: Named Error, Compromise Detection, and Longer Stale Timeout","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.211\/e\/oauth-refresh-lock-named-error-compromise-detection-and-long","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.211","markdown":"### OAuth Refresh Lock: Named Error, Compromise Detection, and Longer Stale Timeout\n\n**What**\n\nThe OAuth token refresh lock now uses a named error class (`OAuthRefreshLockContendedError`), exposes an `isCompromised()` predicate and an abort signal, and raises the stale-lock timeout from 10 seconds to 60 seconds with a 5-second update heartbeat.\n\n**Details**\n\n- `OAuthRefreshLockContendedError` is thrown when the lock is contended after max attempts, replacing the previous untyped error.\n- A new `onCompromised` callback receives a dedicated `AbortController` signal that is aborted when compromise is detected, allowing in-flight refreshes to be cancelled.\n- The increased stale timeout (60 s) reduces false-positive \"lock compromised\" events on slow systems.\n\n**Evidence**\n\nNew named error class (search for `\"OAuthRefreshLockContendedError\"`)"}