curl -v -X POST -H “Content-type:application/x-www-form-urlencoded” "https://dev-977966.okta.com/oauth2/default/v1/token” "client_id=0oa12q40pQWdEa9BX4x6&client_secret=5epLPZHmXamAc_znFgmkSGa1KAaORD2nU9hqwUYR&grant_type=authorization_code&redirect_uri=http://localhost:8080/content-catalog/login&code=l4pfjvskiaogqrjh0mje”.
This is the url I am trying to hit.But constantly getting the error :{“errorCode”:“E0000022”,“errorSummary”:“The endpoint does not support the provided HTTP method”,“errorLink”:“E0000022”,“errorId”:“oaeQcGqhUcWT7asditRk6CDNw”,“errorCauses”:[]}.
But ,now the error is {
“error”: “invalid_grant”,
“error_description”: “The authorization code is invalid or has expired.”
}.
The code is new (<60 seconds) and not even logged(definitely not used) into the developer.okta.com portal.
Why is it invalid then?
I got the same issue.
Here is my cURL script
curl --request POST ^–url “https://dev-899154.okta.com/oauth2/default/v1/token”^–header “Accept: application/json”^–header “Content-type: application/x-www-form-urlencoded”^
–header “Authorization: Basic **********************”^–data-urlencode “grant_type=authorization_code”^–data-urlencode “redirect_uri=https://wsq02230.xxx.xxxx.xxx/xxxxx/OkTaIntegrationCFTest/openid/callback.cfm”^–data-urlencode “code=9bWPbSjWfV5VEuc__Oix”
Could somebody explain us what is a problem with OKTA on AWS.
I sow a lot of questions about the same problem on Okta forum, but nobody give the answer for the problem?
I have next problem: When I am using localhost, everything work well, and I can sing-in and sign-out using Okta. When I deploy the application on the AWS (I changed Sign-in redirect URIs and Sign-out redirect URI, to be like it is for deployed application on AWS (for frontend I am using Angular)). However, I can not sing-in on deployed AWS applcation. I can see in response:
_links: {cancel: {href: “https://dev-xxxxxxx.okta.com/api/v1/authn/cancel”, hints: {allow: [“POST”]}}}
When I go to the: https://dev-xxxxxxx.okta.com/api/v1/authn/cancel ,
I can see the response:
{
“errorCode”: “E0000022”,
“errorSummary”: “The endpoint does not support the provided HTTP method”,
“errorLink”: “E0000022”,
“errorId”: “XXXXXXXXXXXXXXXXXXX”,
“errorCauses”:
}
Could somebody from Okta give us the response and solution for the problem Sign-in, Sign-Out Okta on AWS ?