-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requestedwaiting for feedback
Description
Description
I encountered an issue where authentication with Microsoft Entra ID (CIAM) fails with AADSTS9002325: Proof Key for Code Exchange is required. This happens because the Entra ID discovery document does not publish the code_challenge_methods_supported property, even though PKCE is required for SPA clients. The oidc package correctly parses the metadata, sees the missing field, and presumably defaults to not sending the code_challenge.
Workaround: Manually constructing OidcProviderMetadata and explicitly adding the missing field fixes the issue:
discoveryDocument: OidcProviderMetadata.fromJson({
// ... other fields from .well-known/openid-configuration
"code_challenge_methods_supported": ["S256"], // FORCE PKCE SUPPORT
}),
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingquestionFurther information is requestedFurther information is requestedwaiting for feedback