简体   繁体   中英

Cognito User AWS forget password step error

I'm doing my user management with Cognito from the Amazon WebService on AngularJS.

I have an error for the forget-password step.

I have seen how to do on the exemple given in the AWS git ( https://github.com/aws/amazon-cognito-identity-js )

But I always have this message on my console : Error: callListeners emit emitEvent a [52]</d.prototype.runTo [52]</d.prototype.runTo/< a/< emitEvent/< callListeners emit emitEvent a [52]</d.prototype.runTo [52]</d.prototype.runTo/< a/< emitEvent/< callListeners f emit emitEvent a [52]</d.prototype.runTo [52]</d.prototype.runTo/< a/< emitEvent/< callListeners emit emitEvent a [52]</d.prototype.runTo [52]</d.prototype.runTo/< a/< emitEvent/< callListeners fc/< finishRequest handleRequest/<

I can not figure out why its not working :

This is how I reset my user password :

 AuthService.forgetPassword = function(username) {
            var userData = {
                Username : username,
                Pool : userPool
            };
            cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
            cognitoUser =
                cognitoUser.forgotPassword({
                   onSuccess: function (result) {
                       console.log('call result: ' + result);
                   },
                   onFailure: function(err) {
                        alert(err);
                   },
                   inputVerificationCode() {
                     var verificationCode = prompt('Please input verification code ' ,'');
                     var newPassword = prompt('Enter new password ' ,'');               
               cognitoUser.confirmPassword(verificationCode, newPassword, this);
                    }
               });
            };

Note that the verificationCode and the newPassword getted are well setted. Does anyone know how to do ?

Taking a look on GitHub: https://github.com/aws/amazon-cognito-identity-js/issues/381

Though the same issue with error message format looks present here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM