MCP forced re-auth appends prompt=select_account for non-Microsoft OAuth providers
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the bug
When an MCP OAuth flow is started with forced re-authentication, Copilot CLI unconditionally appends prompt=select_account to the authorization URL, including for non-Microsoft authorization servers that do not advertise support for this prompt value.
A non-Microsoft OpenID Connect provider rejects this unsupported value with invalid_request. The same authorization request succeeds after removing only &prompt=select_account from the URL.
Affected version
GitHub Copilot CLI 1.0.80
Steps to reproduce the behavior
- Configure a remote Streamable HTTP MCP server that uses OAuth with a non-Microsoft OpenID Connect authorization server.
- Complete Dynamic Client Registration and PKCE setup normally.
- Trigger forced re-authentication through
/mcp auth, the MCP server Authenticate action, or therre-auth shortcut. - Inspect the generated authorization URL.
- Observe that Copilot CLI appends
prompt=select_account. - Open the URL and observe that the authorization server rejects it with HTTP 400
invalid_request. - Remove only
&prompt=select_accountand reload the URL while the Copilot CLI callback server remains running. - Observe that the OAuth request proceeds successfully.
Control result:
forceReauth=false: nopromptparameter; authorization proceeds.forceReauth=true:prompt=select_account; authorization is rejected.
Expected behavior
Copilot CLI should not add prompt=select_account unconditionally for every authorization server.
Possible solutions include:
- Add the parameter only when the authorization server advertises
select_accountthroughprompt_values_supported. - Make the forced re-authentication prompt configurable.
- Use a provider-neutral re-authentication mechanism such as
prompt=loginwhen account-selection support is unknown.
Additional context
Environment:
- Windows 11 x64
- PowerShell
- Remote Streamable HTTP MCP server
- OAuth Authorization Code flow with PKCE
- Dynamic Client Registration
- Non-Microsoft OpenID Connect provider
Temporary workaround: copy the generated authorization URL, remove &prompt=select_account, and open the modified URL while the Copilot CLI OAuth callback server is still running.
No credentials, tokens, or private authorization-server URLs are included in this report.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
/mcp auth、MCP サーバーの Authenticate アクション、r の再認証ショートカットから到達する OAuth 認証 URL の生成から始め、forceReauth が prompt=select_account を追加する仕組みを追跡します。認可サーバーが公開している prompt_values_supported メタデータを確認し、強制再認証によって Microsoft 以外のプロバイダーにサポートされていない prompt が送信されなくなっていることを検証するとともに、OAuth フローが引き続き成功することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- authentication, cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100