feat: add OAuth protected resource metadata (RFC 9728)#40
Merged
mattzcarey merged 4 commits intomainfrom Feb 26, 2026
Merged
Conversation
a6d74ed to
f39b393
Compare
Add resourceMetadata config to OAuthProvider for the /.well-known/oauth-protected-resource endpoint. Bump workers-oauth-provider to PR #136 build which implements the endpoint.
f39b393 to
872f7f4
Compare
Contributor
Author
|
Tested and working on staging via MCP Inspector. The |
Includes both RFC 9728 changes: - /.well-known/oauth-protected-resource endpoint (#136) - resource_metadata in WWW-Authenticate headers (#143)
Replace pkg.pr.new preview build with the released v0.2.4 which includes RFC 9728 support (#136, #143), RFC 8252 loopback port flexibility for native apps (#145), and other fixes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@cloudflare/workers-oauth-providerto v0.2.4 (released) — replaces thepkg.pr.newpreview buildscopesSupportedandresourceMetadataon the OAuthProvider so the/.well-known/oauth-protected-resourceendpoint returns proper metadata for MCP auth discoveryWhat's in workers-oauth-provider v0.2.4
/.well-known/oauth-protected-resourceendpoint (#136)resource_metadatain WWW-Authenticate headers (#143)localhost/127.0.0.1redirect URIs with dynamic ports were rejected on/authorizewith "Invalid redirect URI"allowPlainPKCEoption to enforce S256 PKCE (#151)Verified on staging
Test plan
npm run checkpasses (format, lint, typecheck, tests)/.well-known/oauth-protected-resourcereturns valid RFC 9728 metadata/.well-known/oauth-authorization-serverstill works correctly