Skip to content

feat: make refreshCodexTokens previous tokens optional - #13

Merged
TheGreatAxios merged 1 commit into
cl-9403-codex-provider-pin-intx-peer-dependencies-to-040from
cl-9404-codex-provider-make-refreshcodextokens-previous-tokens
Sep 27, 2026
Merged

TheGreatAxios merged 1 commit into
cl-9403-codex-provider-pin-intx-peer-dependencies-to-040from
cl-9404-codex-provider-make-refreshcodextokens-previous-tokens

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes CL-9404

Summary

  • refreshCodexTokens(refreshToken, now, previous?, fetchImpl?): previous is now optional. When given, its accountId is still carried forward if the refresh response has no id_token.
  • @corbits/oauth-core/hub's OAuthLoginProvider.refresh only receives (refreshSecret, now), and its refresher already keeps the prior credential metadata. The README drops the fake { access: "", refresh } tokens and passes refresh: (refreshSecret, now) => refreshCodexTokens(refreshSecret, now).
  • Adds a unit test for the no-previous call: the refresh token is kept and accountId stays unset.
  • The JSDoc says that without previous the caller keeps the account id some other way, for example in credential metadata.
  • Additive: existing three- and four-argument calls behave the same.

Checks

bun run check passes (13 tests).

@TheGreatAxios
TheGreatAxios added this pull request to stack #18 September 26, 2026 04:21
@TheGreatAxios
TheGreatAxios force-pushed the cl-9404-codex-provider-make-refreshcodextokens-previous-tokens branch from d68ced1 to 7a9add4 Compare September 26, 2026 04:26
@TheGreatAxios
TheGreatAxios merged commit 6fc2712 into main Sep 27, 2026
1 check passed
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.

1 participant