Skip to content

dont add code challenge if disablePkce is true#2159

Merged
FabianGosebrink merged 1 commit into
damienbod:mainfrom
salahBouragba:remove-code-challenge-params
Dec 8, 2025
Merged

dont add code challenge if disablePkce is true#2159
FabianGosebrink merged 1 commit into
damienbod:mainfrom
salahBouragba:remove-code-challenge-params

Conversation

@salahBouragba

@salahBouragba salahBouragba commented Dec 7, 2025

Copy link
Copy Markdown
Contributor

Fixes #2157

@salahBouragba salahBouragba force-pushed the remove-code-challenge-params branch from d490145 to 273e047 Compare December 7, 2025 13:15
@FabianGosebrink

Copy link
Copy Markdown
Collaborator

Thanks for this PR. Which issue is going to be fixed with this. Can you link it? Thanks!

@salahBouragba

Copy link
Copy Markdown
Contributor Author

It's this Issue

@FabianGosebrink

Copy link
Copy Markdown
Collaborator

Thanks! Updated the initial post.

@FabianGosebrink FabianGosebrink merged commit 6119125 into damienbod:main Dec 8, 2025
13 checks passed
@salahBouragba salahBouragba deleted the remove-code-challenge-params branch December 8, 2025 12:51
timdeschryver pushed a commit to timdeschryver/angular-auth-oidc-client that referenced this pull request Jun 15, 2026
createBodyForParCodeFlowRequest was unconditionally appending
code_challenge and code_challenge_method to the PAR request body,
even when disablePkce: true. Strict authorization servers reject
the request because code_challenge is invalid (or, after damienbod#2159,
empty in the standard authorize URL but populated here).

Mirror the pattern used in createAuthorizeUrl: route challenge
generation through the existing getCodeChallenge helper (which
short-circuits when PKCE is disabled) and guard the param append.

Adds a unit test asserting that code_challenge,
code_challenge_method, the code verifier creation, and the
challenge generation are all skipped when disablePkce is true.

Refs damienbod#2077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Remove CodeChallenge from Authrorize params

2 participants