amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

Question: With the use case 4 #677

Open tastafur opened 6 years ago

tastafur commented 6 years ago

This code is a sample, but it would not really be used within cognitoUser.authenticateUser because the credentials were just created with new AWS.CognitoIdentityCredentials, it would not be necessary to refresh them, it is a code the .refresh method to say that this method exists, no?

AWS.config.credentials.refresh((error) => {
  if (error) {
      console.error(error);
  } else {
       // Instantiate aws sdk service objects now that the credentials have been updated.
       // example: var s3 = new AWS.S3();
       console.log('Successfully logged!');
  }
});