Guest User

Untitled

a guest
Jun 8th, 2018
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function deleteAttributes(username, password){
  2. var attributeList = [];
  3. attributeList.push("custom:scope");
  4. attributeList.push("name");
  5.  
  6. var authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails({
  7. Username: username,
  8. Password: password,
  9. });
  10.  
  11. var userData = {
  12. Username: username,
  13. Pool: userPool
  14. };
  15. var cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
  16.  
  17. cognitoUser.deleteAttributes(attributeList, (err, result) => {
  18. if (err) {
  19. //handle error
  20. } else {
  21. console.log(result);
  22. }
  23. });
  24. }
Add Comment
Please, Sign In to add comment