Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function deleteAttributes(username, password){
- var attributeList = [];
- attributeList.push("custom:scope");
- attributeList.push("name");
- var authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails({
- Username: username,
- Password: password,
- });
- var userData = {
- Username: username,
- Pool: userPool
- };
- var cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
- cognitoUser.deleteAttributes(attributeList, (err, result) => {
- if (err) {
- //handle error
- } else {
- console.log(result);
- }
- });
- }
Add Comment
Please, Sign In to add comment