如何解决无法从Node.js中的用户池使用令牌返回访问身份池
在用户成功登录后,我正在尝试通过用户池中的令牌返回访问身份池,但是现在我得到:These credentials are not valid for accessing this resource
。我已经在身份池的身份验证提供程序中设置了UserpoolId和ClientId。
这是我的代码
AWS.config.region = 'us-xxx-xx';
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-xxxxxx',Logins: {
'cognito-idp.us-xxx-xx.amazonaws.com/us-xxx-xxx': 'token-return-from-user-pool'
},});
const cognito = new CognitoIdentity;
const openIdToken = await cognito.getOpenIdTokenForDeveloperIdentity({
IdentityPoolId: 'us-xxxxxx',TokenDuration: 3600,}).promise();
我收到此错误:These credentials are not valid for accessing this resource
我哪里错了?请帮助我
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。