I'm getting error 500 in token endpoint. I'm using Google SSO with hosted login UI he login URL is https:/sso.auth.ap-northeast-1.amazoncognito.com/login?response_type=code&client_id=asd123&redirect_uri=https://dev.test.com:5000/dev.html
I'm using 'Authorization code grant' flow. After successful login it returns to url with authorization code callback_url?code=c015030f-d7bc-48e4-b046-0431b1b66ac7
Then I need to get access_token and refresh_token on 'token endpoint'. url: https://sso.auth.ap-northeast-1.amazoncognito.com/oauth2/token using application/x-www-form-urlencoded Authorization: Basic base64(client_id:client_secret) fields
grant_type=authorization_code
scope=email openid profile
redirect_uri=https://dev.test.com:5000/dev.html
code=the code that I got to callback to url
I'm doing all as described in https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html
All I get is error 500 and json {"error": "Internal Error"}