Skip to content

Instantly share code, notes, and snippets.

@ajcrites
Last active June 3, 2016 18:03
Show Gist options
  • Save ajcrites/917b38e375beada2e519e89ab2216b96 to your computer and use it in GitHub Desktop.
Save ajcrites/917b38e375beada2e519e89ab2216b96 to your computer and use it in GitHub Desktop.
function authenticateUser(details, callback) {
if (details) {
return callback.onSuccess();
}
return callback.onFailure();
}
new Promise((onSuccess, onFailure) => {
authenticateUser(true, {
onSuccess,
onFailure,
});
})
.then(result => AWS.config.credentials.getAsync())
.then(() => { /* do something with credentials? */ })
.catch(err => console.error(err));
@nhpolanco
Copy link

you arent running cognitoUser.authenticateUser(...) , or is that what you're passing into function authenticateUser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment