Add prompt=consent for OIDC offline_access scope#681
Merged
pcarleton merged 1 commit intomodelcontextprotocol:mainfrom Jul 14, 2025
Merged
Add prompt=consent for OIDC offline_access scope#681pcarleton merged 1 commit intomodelcontextprotocol:mainfrom
pcarleton merged 1 commit intomodelcontextprotocol:mainfrom
Conversation
pcarleton
approved these changes
Jul 14, 2025
chenxi-null
pushed a commit
to chenxi-null/typescript-sdk
that referenced
this pull request
Jul 28, 2025
Pizzaface
pushed a commit
to RewstApp/mcp-inspector
that referenced
this pull request
Aug 20, 2025
…/fweinberger/fix-npx-no-args bugfix: fix `npx @modelcontextprotoco/inspector` failing on main
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.
<!-- Provide a brief summary of your changes -->
Add automatic prompt=consent parameter when requesting offline_access scope in OpenID Connect flows. This ensures proper user consent for refresh token issuance as required by the OIDC specification.
Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->
OpenID Connect specification requires that when requesting the "offline_access" scope (which grants refresh tokens), the authorization server must ensure the user explicitly consents to this access. By adding prompt=consent when offline_access is requested, we ensure OIDC-compliant authorization servers properly prompt users for consent.
Reference: https://openid.net/specs/openid-connect-core-1_0.html#OfflineAccess
How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were tested? -->
Breaking Changes
<!-- Will users need to update their code or configurations? -->
No breaking changes. This only affects flows that request the offline_access scope, and ensures they comply with OIDC requirements.
Types of changes
<!-- What types of changes does your code introduce? Put an
xin all the boxes that apply: -->Checklist
<!-- Go over all the following points, and put an
xin all the boxes that apply. -->Additional context
<!-- Add any other context, implementation notes, or design decisions -->
This change specifically checks if the requested scope includes "offline_access" and appends prompt=consent to the authorization URL. This is a minimal change that improves OIDC compliance without affecting existing OAuth 2.0 flows.