Repository navigation
feat(oauth): Forward idp_hint to Sentry sign-in - #2448
Merged
Merged
Conversation
MCP clients can name an identity provider for the user's sign-in with `idp_hint` on /oauth/authorize. Sentry MCP keeps one well-formed value in the signed consent state and forwards it to Sentry after approval, along with force_prompt=1 so a hinted connection always ends on Sentry's consent screen. A missing, repeated, or malformed hint is dropped. Sentry decides what each hint value does. The signed state for the hop to Sentry now lasts 30 minutes, long enough for a new user to sign in, create an account, and approve consent. Records the intent and rules in design/mcp-access.md. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
approved these changes
Nov 20, 2026
dcramer
approved these changes
Nov 20, 2026
This branch was successfully deployed
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.
Why: an MCP client sometimes already knows which identity provider a user signs in with. It should be able to say so, so that Sentry can take the user straight to that sign-in instead of its login form. Today Sentry MCP drops any such hint before redirecting to Sentry. Separately, a brand-new user who has to sign in, create a Sentry account and approve consent during a connection can run past the current 10-minute limit on the hop to Sentry and has to start over.
What changes
idp_hinton/oauth/authorizeis kept in the signed consent state. It's forwarded to Sentry only after the user approves on the Sentry MCP consent screen; deny still redirects straight back to the client. Sentry MCP doesn't interpret it: Sentry decides what each value does.force_prompt=1, so Sentry always shows its consent screen with the account being connected, even if the user approved before.[A-Za-z0-9._-]: an identity provider name, never a URL or free text. The hint isn't advertised in metadata.design/mcp-access.md, becauseidp_hintisn't part of OAuth 2.0 or OpenID Connect.Nothing breaks. Requests without
idp_hintbehave as before, apart from the longer state lifetime. RFC 6749 §3.1 requires an authorization server to ignore unrecognized parameters, and Sentry's authorize request validation has noidp_hintfield today. So the forwarded hint changes nothing until Sentry gives it a meaning. Dropping a repeated hint follows the same section: parameters "MUST NOT be included more than once".force_promptis Sentry's own equivalent of OIDCprompt=consent.The design doc's goals and rules come from the requester's direction.
via @dcramer.
--
View Session [Sentry]