fix(metadata): advertise refresh_token in grant_types_supported#34
fix(metadata): advertise refresh_token in grant_types_supported#34caiopavanelli wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 52 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. WalkthroughThis PR updates all OAuth/OIDC metadata endpoints to advertise ChangesOAuth/OIDC Grant Types
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Discovery endpoints listed only authorization_code while /oauth/token already handled refresh_token. Conformant MCP clients skip silent renewal when grant_types_supported omits refresh_token (RFC 8414). Upstream PR candidate for tuannvm/oauth-mcp-proxy. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: caiopavanelli <caiopava@gmail.com>
0ea9d3e to
13b3569
Compare
Fixes #33
Summary
Discovery endpoints advertised only
authorization_codeingrant_types_supported, while/oauth/tokenalready supportsgrant_type=refresh_token(since #17) and/oauth/registeralready lists both grant types. Conformant MCP clients skip silent token renewal when metadata omitsrefresh_token(RFC 8414).This PR aligns all authorization-server metadata responses with the token endpoint and registration behavior.
Changes
refresh_tokentogrant_types_supportedin:HandleMetadata(GET /oauth/metadata)HandleOIDCDiscovery(GET /.well-known/openid-configuration)GetAuthorizationServerMetadata()(native and proxy branches)No changes to
/oauth/tokenhandlers or scope handling.Testing
go test ./...passes locally/.well-known/openid-configuration(or proxy-mode MCP discovery) and confirmgrant_types_supportedincludesrefresh_tokenRelated
Summary by CodeRabbit