2017-04-03 33 views
3

AWS Cognitoの資格情報の設定に問題があります。AWS CognitoがCognitoIdentityCredentialsで資格情報を設定できない

私は、ユースケース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() 
      } 
     }); 

AWS amazon-cognito-identity-jsからのコードの下に、私は私がCognitoIdentityCredentials方法で正しいIdentityPoolIdLoginsを送ってることを確認していましたが、私はリターンとしてaccessKeyIdとはsessionTokenに未定義得ます。

以下は私が入手したものです。 CognitoIdentityCredentials {expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: Object…}

これを修正する方法はありますか?

答えて

1

これ以降、資格情報プロバイダが資格情報を要求することを確認するために 'AWS.config.credentials.get()'を呼び出していますか?

関連する問題