Ohs*_*sik 6 amazon-web-services aws-sdk aws-cognito
我在设置AWS Cognito的凭证时遇到问题。
我有以下来自用例4的AWS amazon-cognito-identity-js的代码。
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()
}
});
Run Code Online (Sandbox Code Playgroud)
我检查了,我传送给正确的IdentityPoolId和Logins对CognitoIdentityCredentials的方法,但我得到了一个未定义的accessKeyId和sessionToken作为回报。
以下是我得到的。
CognitoIdentityCredentials {expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: Object…}
任何想法如何解决这个问题?
| 归档时间: |
|
| 查看次数: |
609 次 |
| 最近记录: |