我在令牌终结点中遇到错误500。我正在使用带有托管登录UI的Google SSO。登录URL为https:/sso.auth.ap-northeast-1.amazoncognito.com/login?response_type=code&client_id=asd123&redirect_uri=https://dev.test.com:5000/dev.html
我使用的是“授权码授权”流程。成功登录后,它返回到带有授权码callback_url?code=c015030f-d7bc-48e4-b046-0431b1b66ac7的url
然后我需要在'token endpoint‘上获取access_token和refresh_token。https://sso.auth.ap-northeast-1.amazoncognito.com/oauth2/token:使用应用程序的base64/x-www-form-urlencoded授权:基本url(client_id:client_secret)字段
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我正在按照https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html中的描述执行所有操作
我得到的只是错误500和json {" error ":"Internal Error"}
发布于 2018-07-08 15:03:36
我找到问题了。我在header的Authorization中有两个空格,在Basic和hash之间。无论如何,亚马逊在错误处理方面也有一个问题,我们不应该得到500。
https://stackoverflow.com/questions/51193497
复制相似问题