Last active
October 17, 2018 10:50
-
-
Save shamique/cdb717a67f78f7c1f076de690103c61a to your computer and use it in GitHub Desktop.
This file contains 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
signUp(email, password) { | |
return new Promise((resolved, reject) => { | |
const userPool = new AWSCognito.CognitoUserPool(this._POOL_DATA); | |
let userAttribute = []; | |
userAttribute.push( | |
new AWSCognito.CognitoUserAttribute({ Name: "email", Value: email }) | |
); | |
userPool.signUp(email, password, userAttribute, null, function(err, result) { | |
if (err) { | |
reject(err); | |
} else { | |
resolved(result); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment