Skip to content

Authorization Code Flow (PKCE) ask for the client_secret #2326

Answered by mbreton
mbreton asked this question in Q&A
Discussion options

You must be logged in to vote

Quick update: Indeed client_secret is not mandatory for this kind of grant flow. I explain here the solution for tracing.

More explanations: After you answer, I dig deeply on my implementation and I figure out my OAuth client was not well configured.
Indeed, to use an Authorization Code Flow with Proof Key for Code Exchange (PKCE) you have to set token_endpoint_auth_method to none .
I had a second issue on my implementation about the SHA256 then base64 transformation to generate the code_verifier. The majority of online tool to generate this value produced malformed value.
I share with you a working example written in Rust:

[package]
name = "test_pkce"
version = "0.1.0"
authors = ["Mat <…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mbreton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants