fix: OIDC discovery advertises unsupported id_token response_type (#39498)

The OIDC discovery document at `/.well-known/openid-configuration`
advertised `id_token` in `response_types_supported`, but
`/login/oauth/authorize` only implements the authorization code flow and
rejects any other response_type with `unsupported_response_type`. This
mismatch caused OIDC client libraries that rely on discovery to attempt
the implicit flow and fail silently.

This removes `id_token` from `response_types_supported` so discovery
matches actual server behavior, and adds an integration test asserting
`response_type=id_token` is rejected consistently.

Fixes #39482.
This commit is contained in:
Shivansh Garg authored and GitHub committed 2026-10-08 18:10:54 +00:00
1 parent 1903c61627
commit c0a8eb8e74
2 files changed
+11 -1

No files matched your search

-1
View File
@@ -31,7 +31,6 @@ func OIDCWellKnown(ctx *context.Context) {
"introspection_endpoint": oidcBaseUrl + "/login/oauth/introspect",
"response_types_supported": []string{
"code",
"id_token",
},
"id_token_signing_alg_values_supported": []string{
oauth2_provider.DefaultSigningKey.SigningMethod().Alg(),