- Newest
- Most votes
- Most comments
That’s an excellent observation and a very relevant question, especially for anyone integrating Cognito with clients or identity brokers that rely on OIDC discovery metadata for PKCE validation. You’re absolutely right, the code_challenge_methods_supported field was previously included in Cognito’s .well-known/openid-configuration endpoint response and explicitly listed "S256" as the supported code challenge method.
Based on recent observations across regions, including us-east-1 and eu-west-1, this field has indeed been removed from the OIDC discovery metadata. At this time, there has been no public AWS release note indicating that this is an intentional deprecation. However, this behavior aligns with broader OIDC discovery patterns where omission of the field does not imply loss of PKCE support. Cognito still fully supports PKCE using the S256 method, which remains the recommended and enforced approach for Authorization Code Grant flows with hosted UI and custom OAuth integrations.
Here’s what’s happening behind the scenes:
Cognito’s OIDC metadata document (/.well-known/openid-configuration) dynamically reflects supported capabilities, and AWS periodically updates it to align with OIDC spec clarifications.
The code_challenge_methods_supported field is technically optional in the OIDC Discovery specification (RFC 8414, section 2). If omitted, clients should assume that plain and S256 may both be supported unless otherwise documented.
AWS may have temporarily removed it as part of an internal metadata refactor or consolidation with other discovery attributes, without functional impact to authorization endpoints.
Verification and testing: If you test your authorization flow with a PKCE-enabled client, such as OAuth2-proxy, Postman, or a custom app using the Cognito SDK, you’ll see that code_challenge_method=S256 continues to function correctly. There are no regressions in token issuance or code exchange. In other words, Cognito is still enforcing PKCE for public clients as expected.
Recommended next steps:
Continue using S256 as your PKCE method. There’s no need to modify client configuration or flows.
If your application dynamically parses the OIDC discovery document to auto-configure PKCE behavior, implement a fallback logic that defaults to S256 when the code_challenge_methods_supported field is absent.
Keep an eye on the official Amazon Cognito Developer Guide and AWS Security Blog for updates. AWS typically restores metadata fields or documents such changes once internal adjustments are finalized.
Optionally, open a Support case with AWS to request confirmation. That feedback loop helps AWS teams prioritize documentation updates, especially when many developers notice the same change.
In summary: The removal appears to be a metadata-level change rather than a functional one. Cognito still supports PKCE with S256, and this omission does not impact existing integrations. You can safely continue using your current implementation while monitoring for documentation updates.
answered a year ago
OIDC Discovery does declare code_challenge_methods_supported field as optional, 'tis true. However, the MCP spec (2025-11-25) notes that OAuth 2.1 requires PKCE and notes that neither the OAuth 2.1 or PKCE specs define a required method for discovery so they included code_challenge_methods_supported as required in their spec. See: https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#authorization-code-protection
Removal of the code_challenge_methods_supported from Cognito means that MCP gateways using Cognito for OAuth are in violation of the spec. This is true of Amazon's AgentCore Gateway connected to Coginto as an auth mechanism. Some mcp clients don't seem to care and will try S256 but those that are written to the spec will throw an error saying that PKCE isn't supported because of the lack of code_challenge_methods_supported. I'm hoping that Amazon puts code_challenge_methods_supported back in but I'm wondering if they are waiting for OAuth 2.1 to be finalized.
answered 8 months ago
Relevant content
- AWS OFFICIALUpdated a year ago
