Last active
June 3, 2016 18:03
-
-
Save ajcrites/917b38e375beada2e519e89ab2216b96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you arent running cognitoUser.authenticateUser(...) , or is that what you're passing into function authenticateUser?