Repository navigation
Add offline_access to default scopes and fix PRM scope discovery - #3794
Merged
Merged
Conversation
jhrozek
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
eleftherias,
lujunsan and
yrobla
as code owners
February 11, 2026 21:57
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3794 +/- ##
=======================================
Coverage 66.78% 66.78%
=======================================
Files 437 437
Lines 43002 43012 +10
=======================================
+ Hits 28718 28727 +9
- Misses 12078 12080 +2
+ Partials 2206 2205 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
MCP clients like VS Code resolve OAuth scopes from the Protected Resource Metadata (RFC 9728) scopes_supported field. When no explicit scopes were configured, the PRM handler defaulted to ["openid"], causing clients to never request offline_access and therefore never receive refresh tokens. Separate the PRM and auth server default scopes. Per RFC 9728, PRM scopes_supported describes what the resource server needs (minimal: ["openid"]), while auth server scopes describe what the AS supports (["openid", "profile", "email", "offline_access"]). These are distinct concerns that should not share a single constant. When the embedded auth server is configured, the config builder now propagates the AS's ScopesSupported to the PRM so clients discover the full set of supported scopes including offline_access. When using an external OIDC provider without explicit scopes, the PRM safely defaults to ["openid"]. Add integration tests verifying refresh token issuance with offline_access and its absence without it. Fixes: #3776
jhrozek
force-pushed
the
fix/prm-scope-defaults
branch
from
February 11, 2026 22:59
8405152 to
d2f9e77
Compare
tgrunnagle
approved these changes
Feb 12, 2026
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.
MCP clients like VS Code resolve OAuth scopes from the Protected Resource Metadata (RFC 9728) scopes_supported field. When no explicit scopes were configured, the PRM handler defaulted to ["openid"], causing clients to never request offline_access and therefore never receive refresh tokens.
Separate the PRM and auth server default scopes. Per RFC 9728, PRM scopes_supported describes what the resource server needs (minimal: ["openid"]), while auth server scopes describe what the AS supports (["openid", "profile", "email", "offline_access"]). These are distinct concerns that should not share a single constant.
When the embedded auth server is configured, the config builder now propagates the AS's ScopesSupported to the PRM so clients discover the full set of supported scopes including offline_access. When using an external OIDC provider without explicit scopes, the PRM safely defaults to ["openid"].
Add integration tests verifying refresh token issuance with offline_access and its absence without it.
Fixes: #3776