Skip to content

[codex] Fix OAuth popup completion and DCR reuse#852

Merged
RhysSullivan merged 1 commit into
mainfrom
codex/fix-oauth-popup-dcr-reuse
May 20, 2026
Merged

[codex] Fix OAuth popup completion and DCR reuse#852
RhysSullivan merged 1 commit into
mainfrom
codex/fix-oauth-popup-dcr-reuse

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

Summary

  • Keep the OAuth popup opener available so the same-origin callback can notify the onboarding page with postMessage instead of relying only on BroadcastChannel.
  • Reuse dynamic client registration state from pending OAuth sessions and completed dynamic-DCR connections to avoid re-registering a client on retries or reconnects.
  • Add coverage proving DCR registration is reused across start retries and reconnects.

Root Cause

Chrome could miss the popup completion signal because the opener handle was nulled while the callback HTML expected window.opener.postMessage(...) to work. Retrying the flow then called Dynamic Client Registration again, which can hit provider rate limits.

Validation

  • bun run vitest run src/testing.test.ts in packages/core/sdk
  • bun run typecheck in packages/core/sdk (passed with existing Effect language-service suggestions/warnings)
  • bun run vitest run src/api/oauth-popup.test.ts in packages/react

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 20, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 6df86fe Commit Preview URL

Branch Preview URL
May 20 2026, 05:10 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 20, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 6df86fe May 20 2026, 05:10 PM

@RhysSullivan RhysSullivan force-pushed the codex/fix-oauth-popup-dcr-reuse branch from a703adb to 6df86fe Compare May 20, 2026 17:08
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 20, 2026

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@852

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@852

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@852

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@852

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@852

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@852

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@852

@executor-js/plugin-google-discovery

npm i https://pkg.pr.new/@executor-js/plugin-google-discovery@852

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@852

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@852

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@852

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@852

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@852

executor

npm i https://pkg.pr.new/executor@852

commit: a703adb

@RhysSullivan RhysSullivan marked this pull request as ready for review May 20, 2026 17:13
@RhysSullivan RhysSullivan merged commit 6d17707 into main May 20, 2026
10 checks 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