I can't get my Cognito license

0

hello.

I'd like to get a secret key and access key ID as a cognito license.

cognitoUser.authenticateUser(authenticationDetails, {
      onSuccess: function (result) {
        const idToken = result.getIdToken().getJwtToken();

        AWS.config.credentials =
        new AWS.CognitoIdentityCredentials({
        IdentityPoolId:
          'ap-northeast-2:7fc9xxxx-xxxx-xxxx-xxxxx-xxxxx',
        Logins: {
          'cognito-idp.ap-northeast-2.amazonaws.com/userPoolid':
          idToken,
        },
    }) 
}

On the Cognito aws Identity Pool page, it is confirmed that the identity browser has become a credential.

However, in getCredentials, "Could not load credentials from CognitoIdentityCredentials" is generated.

AWS.config.getCredentials(function (err) {
	if (err) return console.error(err.stack);
  else console.log('Access key:', AWS.config.credentials.accessKeyId);
})

If you look at the AWS.config.credentials console log, there are no values other than the parameters you put in.

Problem not found.

Is it right to get the secret key issued through Cognito Identity Credentials?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인