错误500 Cognito';令牌端点'/oauth2/token

错误500 Cognito';令牌端点'/oauth2/token,oauth,aws-cognito,Oauth,Aws Cognito,令牌端点中出现错误500。 我正在使用带有托管登录UI的Google SSO 登录URL是https:/sso.auth.ap-northeast-1.amazoncognito.com/login?response\u type=code&client\u id=asd123&redirect\u uri= 我正在使用“授权代码授权”流。成功登录后,它返回到url,授权代码为callback_url?code=c015030f-d7bc-48e4-b046-0431b1b66ac7 然后我需要

令牌端点中出现错误500。 我正在使用带有托管登录UI的Google SSO 登录URL是https:/sso.auth.ap-northeast-1.amazoncognito.com/login?response\u type=code&client\u id=asd123&redirect\u uri=

我正在使用“授权代码授权”流。成功登录后,它返回到url,授权代码为callback_url?code=c015030f-d7bc-48e4-b046-0431b1b66ac7

然后我需要在“令牌端点”上获取访问令牌并刷新令牌。 网址: 使用application/x-www-form-urlencoded 授权:基本base64(客户端id:客户端机密) 田地

我所做的一切都如中所述

我得到的只是错误500和json
{“error”:“internalerror”}

我发现了问题。在头的授权中,Basic和hash之间有两个空格。不管怎么说,amazon中的错误处理也存在问题,我们不应该得到500

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