Skip to content

Instantly share code, notes, and snippets.

@shamique
Last active October 17, 2018 10:50
Show Gist options
  • Save shamique/cdb717a67f78f7c1f076de690103c61a to your computer and use it in GitHub Desktop.
Save shamique/cdb717a67f78f7c1f076de690103c61a to your computer and use it in GitHub Desktop.
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