Skip to content

Honor OAuth resource metadata challenges - #1981

Merged
RhysSullivan merged 1 commit into
mainfrom
fix/oauth-resource-metadata-challenge
Sep 14, 2026
Merged

RhysSullivan merged 1 commit into
mainfrom
fix/oauth-resource-metadata-challenge

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

MCP OAuth discovery ignored the endpoint's Bearer resource_metadata challenge and tried a guessed well-known path first. When those documents advertise different resource identifiers, authorization targets the wrong resource and can fail with invalid_target.

Follow the advertised metadata URL first, retaining path/origin discovery when no URL is advertised. Reuse the existing authentication-challenge parser, validate advertised URLs, keep resource credentials on their origin, and close header-only probe requests with their scope.

Validation: 56 focused SDK tests; SDK typecheck; repository formatting and lint; direct discovery against a live MCP provider. Hosted-emulator browser regression passed on this commit (1 test): correct resource, consent callback, and successful token exchange. The emulator consent form omits its login field, so the test submits the synthetic account through the emulator HTTP form contract. Full CI remains pending.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

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 7f70971 Commit Preview URL

Branch Preview URL
Sep 12 2026, 06:54 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

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 7f70971 Sep 12 2026, 06:55 PM

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Sep 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

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

@executor-js/config

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

@executor-js/execution

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

@executor-js/sdk

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

@executor-js/codemode-core

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

@executor-js/runtime-quickjs

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

@executor-js/plugin-file-secrets

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

@executor-js/plugin-graphql

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

@executor-js/plugin-keychain

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

@executor-js/plugin-mcp

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

@executor-js/plugin-onepassword

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

@executor-js/plugin-openapi

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

executor

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

commit: 7f70971

@RhysSullivan
RhysSullivan marked this pull request as ready for review September 14, 2026 04:52
@RhysSullivan
RhysSullivan merged commit e29c360 into main Sep 14, 2026
44 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