Repository navigation
feat(mcp): Honor OIDC prompt to let clients pick a Sentry account - #1971
Merged
Merged
Conversation
When the sign-in browser already has a Sentry session, Sentry skips its consent step for an app the user already approved, so a second account can't be connected without signing out of sentry.io first. Add a "Use a different Sentry account" option to the MCP approval screen. When selected, the Sentry redirect carries force_prompt=1, so Sentry shows the signed-in user and Switch account. The option is preselected when the client sends OIDC prompt=select_account, consent, or login, and authorization server metadata advertises prompt_values_supported. The default reconnect flow is unchanged. Refs #1925 Co-Authored-By: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
|
This is LGTM but since it is a product decision, leaving it to you @dcramer |
Per review, multi-account is an outlier case and shouldn't change the approval screen everyone sees. Remove the "Use a different Sentry account" option. The OIDC `prompt` from the client is now carried in the signed approval form state and mapped straight to Sentry's force_prompt, with no UI change. Co-Authored-By: Claude <[email protected]>
BYK
approved these changes
Nov 9, 2026
7 tasks done
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.
Connecting a second Sentry login to the same MCP client doesn't work while the sign-in browser has a Sentry session. Sentry skips its consent step for an app the user already approved, and that step is the only place that shows who is signed in and offers Switch account. This implements approach B from #1925.
When a client sends OIDC
prompt=select_account,consent, orloginto/oauth/authorize, the sentry.io redirect now carriesforce_prompt=1. Sentry already reads that flag (useOAuthAuthorizeFlow.ts) and then shows its consent step instead of auto-approving. Copilot CLI, for example, sendsselect_accountwhen it forces a re-auth. The flag lives in the signed approval form state. It isn't added to the auth request that reaches the callback.Root and path-scoped authorization server metadata now advertise
prompt_values_supported: ["consent", "select_account"].loginis accepted but not advertised, because Sentry shows the signed-in account rather than forcing re-authentication.prompt=noneis still ignored, as it was before.The approval screen doesn't change, and requests without
promptgo through the same flow as today. An earlier revision added a "Use a different Sentry account" checkbox. Review said multi-account is an outlier case that shouldn't change the screen everyone sees, so the checkbox is gone.The
login_hintrecently added to Sentry OAuth doesn't help here. It exists only on the device flow, and the MCP server doesn't know which email the user wants anyway.Refs #1925
via @BYK.
--
View Session in Sentry