Fix MCP OAuth login with OIDC SSO#30449
Conversation
🔴 Playwright Results — workflow failedValidated commit ✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky Pipeline and setup failures (5)
Performance⚪ Performance metrics unavailable; see the CI and reporting failures above.
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…void callback race
This comment was marked as outdated.
This comment was marked as outdated.
Code Review ✅ Approved 2 resolved / 2 findingsRefactors MCP OAuth to use the full OIDC round-trip and bypass the internal active-session shortcut, resolving the ID token issuer mismatch. Clean implementation with robust test coverage and no open findings. ✅ 2 resolved✅ Quality: Misleading log/dead path after removing early return in MCP flow
✅ Edge Case: Persister silently no-ops if session/auth-request id missing
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Fixes #30445
Problem
ChatGPT (or other MCP tool) login break for companies using SSO login (OIDC). Server check id from wrong source expect Google, get company's own login server. Login fail, 500 error.
Fix
Web login path is untouched (guarded behind
!isMcpFlow).Greptile Summary
This PR completes the MCP OIDC authorization-code round trip before redirecting to the external provider.
Confidence Score: 5/5
The PR appears safe to merge with no blocking failures remaining.
No blocking failure remains.
Important Files Changed
Sequence Diagram
Reviews (5): Last reviewed commit: "fix(mcp): hand provider OIDC credentials..." | Re-trigger Greptile
Context used: