Last active
October 17, 2018 10:50
-
-
Save shamique/3cd87d93cddf3293cc9ee882d8c650da 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
confirmUser(verificationCode, userName) { | |
return new Promise((resolved, reject) => { | |
const userPool = new AWSCognito.CognitoUserPool(this._POOL_DATA); | |
const cognitoUser = new AWSCognito.CognitoUser({ | |
Username: userName, | |
Pool: userPool | |
}); | |
cognitoUser.confirmRegistration(verificationCode, true, 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