3
我遇到了为AWS Cognito设置凭据的问题。AWS Cognito无法在CognitoIdentityCredentials上设置凭据
我有以下从AWS amazon-cognito-identity-js代码用例4.
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId : '...', // your identity pool id here
Logins : {
// Change the key below according to the specific region your user pool is in.
'cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>' : result.getIdToken().getJwtToken()
}
});
我已经检查了我的CognitoIdentityCredentials
方法发送正确IdentityPoolId
和Logins
,但我得到了一个未定义的accessKeyId和sessionToken作为回报。
下面是我得到的。 CognitoIdentityCredentials {expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: Object…}
任何想法如何解决这个问题?