Should the error for an unsupported code_challenge_method say what is wrong?
Error description explains the unsupported transformationRFC 7636 §4.4.1SHOULDRoles: authorization_server
Requirement as recorded in the ProtocolSoup registry
The "error_description" or the response of "error_uri" SHOULD explain the nature of error, e.g., transform algorithm not supported.
Read §4.4.1 in RFC 7636Self-test verdict
PassCommit 00bac3fEvaluated
This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.
Captured from production
Captured Commit 00bac3f
Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.
Passing exchange
Not captured: The requirement constrains an error response, so every exchange that shows it is a refusal. The failing exchange is that response.
Failing exchange
Rejected, as requiredConformance client
The conformance client sends public-app's authorization request with a code_challenge twice: with code_challenge_method=plain, and with no code_challenge_method, which Section 4.3 defines as plain. This authorization server supports S256 only. The error_description of each response says that S256 is the only supported transformation.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.GET https://protocolsoup.com/oauth2/authorize?client_id=public-app&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=plain&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=code&scope=profile&state=4W6bdOMnzhJJ964EbL9HCA302 Found
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
GET /oauth2/authorize?client_id=public-app&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=plain&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=code&scope=profile&state=4W6bdOMnzhJJ964EbL9HCA HTTP/2.0 Accept: text/html Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1
Response
HTTP/2.0 302 Found Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65bb06b5a083cdb-MSP Content-Type: text/html; charset=utf-8 Date: Sun, 06 Dec 2026 13:38:07 GMT Fly-Request-Id: 01M95S6ZS5Z23KQ8T3F78V5J04-ord Location: https://protocolsoup.com/callback?error=invalid_request&error_description=the+requested+code_challenge_method+is+not+supported%3B+this+server+supports+S256+only+%28RFC+7636+Section+4.4.1%29&iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&state=4W6bdOMnzhJJ964EbL9HCA Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} Referrer-Policy: strict-origin-when-cross-origin Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=WQ9Rmo57XBeNLLbpC8cMpCO3plJgIK5iQdh%2FLl5dDS1JNZQwr%2BXtD9JHMrjGiMfBaNIQaI5TEwfU2R%2F2VaIfCqRz4k%2BhhfT%2Br0ejrr1iUkJbnBtF6l36%2B0b0PoaTdt34WrU%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=3,cfOrigin;dur=197 Speculation-Rules: "/cdn-cgi/speculation" Vary: Origin Vary: accept-encoding Via: 1.1 fly.io, 1.1 fly.io X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Xss-Protection: 1; mode=block <a href="https://protocolsoup.com/callback?error=invalid_request&error_description=the+requested+code_challenge_method+is+not+supported%3B+this+server+supports+S256+only+%28RFC+7636+Section+4.4.1%29&iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&state=4W6bdOMnzhJJ964EbL9HCA">Found</a>.2.GET https://protocolsoup.com/oauth2/authorize?client_id=public-app&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=code&scope=profile&state=P9NixPICLAgutzPWzeXFJw302 Found
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
GET /oauth2/authorize?client_id=public-app&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=code&scope=profile&state=P9NixPICLAgutzPWzeXFJw HTTP/2.0 Accept: text/html Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1
Response
HTTP/2.0 302 Found Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65bb07198553cdb-MSP Content-Type: text/html; charset=utf-8 Date: Sun, 06 Dec 2026 13:38:08 GMT Fly-Request-Id: 01M95S70S9644H1P44ZXE6DWKY-ord Location: https://protocolsoup.com/callback?error=invalid_request&error_description=code_challenge_method+is+absent%2C+which+requests+the+plain+transformation+%28RFC+7636+Section+4.3%29%3B+this+server+supports+S256+only&iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&state=P9NixPICLAgutzPWzeXFJw Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} Referrer-Policy: strict-origin-when-cross-origin Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=RuAkp%2Bh79LJNliSd0WKVm9lrVqWFJpnRgYmCbpwfIlQUXJmJD%2FhyEa1NGhJrYwJ1TiQaeKgUKVzupOG5VCD5m62AtxykFU9%2FOb4XKKudSQqGq%2FF1C%2BoNtL%2B45Da5SfjhrBA%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=4,cfOrigin;dur=235 Speculation-Rules: "/cdn-cgi/speculation" Vary: Origin Vary: accept-encoding Via: 1.1 fly.io, 1.1 fly.io X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Xss-Protection: 1; mode=block <a href="https://protocolsoup.com/callback?error=invalid_request&error_description=code_challenge_method+is+absent%2C+which+requests+the+plain+transformation+%28RFC+7636+Section+4.3%29%3B+this+server+supports+S256+only&iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&state=P9NixPICLAgutzPWzeXFJw">Found</a>.
Tests
- TestUnsupportedCodeChallengeMethodErrorExplainsItself
./internal/protocols/oauth2
Pass
Implementation
Explainer
What this requires
Yes: when the authorization endpoint refuses a code challenge transformation, the error_description it returns, or the page behind error_uri, should say what the problem is. invalid_request is the broadest code RFC 6749 has. Section 4.1.2.1 uses it for a request that "is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed." A client developer who receives it alone has to guess which of the request's parameters was at fault.
The level is SHOULD, and the content is the server's to choose. The RFC's own example, "transform algorithm not supported", is the minimum. A description that names the supported method is more useful, because it tells the developer what to send instead.
Why it exists
PKCE errors are easy to misread. A client library that omits code_challenge_method has asked for plain without writing the word anywhere, and the refusal looks unprovoked unless the server explains the default. The same sentence appears in Section 4.4.1 for the other PKCE refusal, a missing code_challenge on a server that requires one, with "code challenge required" as its example.
What non-compliance looks like
A bare error=invalid_request with no description, or a generic one such as "invalid request", leaves the developer comparing their request with the specification parameter by parameter.
How ProtocolSoup tests it
This server has two descriptions. For a named method it does not support: the requested code_challenge_method is not supported; this server supports S256 only (RFC 7636 Section 4.4.1). For a code_challenge with no method: code_challenge_method is absent, which requests the plain transformation (RFC 7636 Section 4.3); this server supports S256 only. Both stay inside the characters RFC 6749 allows in error_description.
TestUnsupportedCodeChallengeMethodErrorExplainsItself requests plain, no method and S512, and asserts that each error_description names S256 and says what is supported, and that the one for the absent method mentions plain.
The requirement constrains an error response, so only a failing exchange is captured: error-description-names-the-transformation records both redirects and checks that each description names S256.