Skip to content

Add support for PKCE in oauth2 - #59930

Open
julien-nc wants to merge 4 commits into
masterfrom
enh/12881/oauth2-pkce
Open

Add support for PKCE in oauth2#59930
julien-nc wants to merge 4 commits into
masterfrom
enh/12881/oauth2-pkce

Conversation

@julien-nc

@julien-nc julien-nc commented Apr 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Support optional code_challenge and code_challenge_method params in the authorize endpoint
  • Implement PKCE support as described in the RFC
  • When using PKCE, only allow the S256 method (do no support plain)
  • Fix preservation of the query params and fragments in the redirect URL

TODO

  • test with a real client: This script was used for testing: pkce_test.sh . It takes the base URL, client ID and client secret as input, generates the code challenge, guides the user to browse the authorize page and log in, then takes the oauth code as input (the user gets it in the redirect URI) and performs a bunch of test requests (testing errors and successes).
  • adjust server documentation

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
… verifier according to th RFC, adjust tests

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…pport legacy redirect URL

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc
julien-nc force-pushed the enh/12881/oauth2-pkce branch from 3eef33c to 9c3f441 Compare August 17, 2026 10:08
@julien-nc
julien-nc marked this pull request as ready for review August 17, 2026 10:11
@julien-nc
julien-nc requested review from Altahrim, CarlSchwan and icewind1991 and removed request for a team August 17, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement OAUTH2 Authorization code with PKCE

3 participants