Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #597 from tmartin2089/master
Browse files Browse the repository at this point in the history
Update README.md use case #4
  • Loading branch information
Ionut Trestian authored Nov 17, 2017
2 parents 94e1499 + 78cd926 commit f2c12dc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,17 @@ The usage examples below use the unqualified names for types in the Amazon Cogni
'cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>' : result.getIdToken().getJwtToken()
}
});

// Instantiate aws sdk service objects now that the credentials have been updated.
// example: var s3 = new AWS.S3();


//refreshes credentials using AWS.CognitoIdentity.getCredentialsForIdentity()
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!');
}
});
},

onFailure: function(err) {
Expand Down

0 comments on commit f2c12dc

Please sign in to comment.