Token Request
Client Sends the authorization code and the code verifier to the token endpoint
Upon receipt of the authorization code, the client sends the access token request to the token endpoint. In addition to the parameters, it sends the following parameter:
- code_verifier: REQUIRED. code_verifier should be generated at the time of Authorization Request. Seeabove .
The "code_challenge_method" is bound to the Authorization Code when the Authorization Code is issued. That is the method that the token endpoint MUST use to verify the "code_verifier".
Server verifies code_verifier before returning the tokens
Upon receipt of the request at the token endpoint, the server verifies it by calculating the code challenge from the received "code_verifier" and comparing it with the previously associated "code_challenge", after first transforming it according to the "code_challenge_method" method specified by the client.