github / github/copilot-cli

MCP forced re-auth appends prompt=select_account for non-Microsoft OAuth providers

Abierto
#4,526 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

triage
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

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

  1. Configure a remote Streamable HTTP MCP server that uses OAuth with a non-Microsoft OpenID Connect authorization server.
  2. Complete Dynamic Client Registration and PKCE setup normally.
  3. Trigger forced re-authentication through /mcp auth, the MCP server Authenticate action, or the r re-auth shortcut.
  4. Inspect the generated authorization URL.
  5. Observe that Copilot CLI appends prompt=select_account.
  6. Open the URL and observe that the authorization server rejects it with HTTP 400 invalid_request.
  7. Remove only &prompt=select_account and reload the URL while the Copilot CLI callback server remains running.
  8. Observe that the OAuth request proceeds successfully.

Control result:

  • forceReauth=false: no prompt parameter; 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_account through prompt_values_supported.
  • Make the forced re-authentication prompt configurable.
  • Use a provider-neutral re-authentication mechanism such as prompt=login when 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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza en la generación de la URL de autorización de OAuth a la que se llega mediante /mcp auth, la acción Authenticate del servidor MCP y el atajo de reautenticación r; sigue cómo forceReauth añade prompt=select_account. Comprueba los metadatos prompt_values_supported anunciados por el servidor de autorización y verifica que la reautenticación forzada ya no envía un prompt no compatible a proveedores que no son de Microsoft, mientras el flujo de OAuth sigue funcionando correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
authentication, cli
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.