I'm trying to upgrade an app that was using the implicit grant flow to the authorization code grant flow. Previously, I just hit the auth URL to get an access code:
/v1/o/authorize/?client_id=<client_id>&response_type=token&redirect_uri=<redirect>
The user was able to log in, and I was able to catch the access code from the URL. Now, I'm trying to go the PKCE route, and I'm a little confused:
1) Generate a code verifier and a code challenge
2) hit the auth url to get an auth code:
/v1/o/authorize/?client_id=<client_id>&response_type=code&redirect_uri=<redirect>&codechallengemethod=S256&code_challenge=<code_challenge>
3) Then, using the code received from the callback above, exchange it for the access code (here's where I'm not sure):
/v1/o/authorize/?client_id=<client_id>&redirect_uri=<redirect>&grant_type=authorization_code&code=<received code>&code_verifier=<generated verifier>
4) I'm assuming that the callback URL will contain either an ?error or #access_code or something to that effect.
Any help would be appreciated
Thanks!