Which functions to use for obtaining id_token given Authorization Code #4449
Unanswered
quackerjeff
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The thought was using the returned "code" from the login and pass that into our backend server. The backend server would be responsible for obtaining the id_token for needed use. I've looked at all the functions or operations and I can't find anything that would seem to fit. I'm trying to do in Go code the following:
curl --location --request POST 'https://mycognitodomain.auth.us-east-1.amazoncognito.com/oauth2/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Basic <base64 encoded client_id:client_secret>' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=<client_id>' \ --data-urlencode 'code=<use the code you received post login>' \ --data-urlencode 'redirect_uri=https://myapp.com'
without having to write my own http client/handler.
Beta Was this translation helpful? Give feedback.
All reactions