Skip to content

Exchange code from PKCE flow #2393

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

You must be logged in to vote

Ok, i find the solution, when start the request i need to add a code_challenge.

The start of flow is with the params

  • client_id=.
  • response_type=code
  • scope=
  • redirect_uri=
  • scope= example: openid.
  • state randon string for prevent cross-site request.
  • code_challenge_method=S256.
  • code_challenge= is the code challenge used for PKCE at this point.

The end flow

POST https://localhost:4444/oauth2/token

BODY
> grant_type=authorization_code
> code=obC7K0XicCC-iunig-33hPUQIhN4fS9eU3vMe8OfCtA.xWyQbGdMuKa1EV7epkt-h32g-8UzuVEBHpIvEnXZWnw
> code_verifier=Generated from code challenge set on start
> redirect_uri=exaple: http://localhost/v1/status
> client_id=<string>

Replies: 1 comment

Comment options

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