首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误500 Cognito 'token endpoint‘/oauth2/token

错误500 Cognito 'token endpoint‘/oauth2/token
EN

Stack Overflow用户
提问于 2018-07-05 22:11:27
回答 1查看 434关注 0票数 1

我在令牌终结点中遇到错误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)字段

代码语言:javascript
复制
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"}

EN

回答 1

Stack Overflow用户

发布于 2018-07-08 15:03:36

我找到问题了。我在header的Authorization中有两个空格,在Basic和hash之间。无论如何,亚马逊在错误处理方面也有一个问题,我们不应该得到500。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51193497

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档