繁体   English   中英

Cognito用户AWS忘记密码步骤错误

[英]Cognito User AWS forget password step error

我正在使用AngularJS上Amazon WebService的Cognito进行用户管理。

忘记密码步骤有错误。

我已经看到了如何对AWS git( https://github.com/aws/amazon-cognito-identity-js )中给出的示例进行操作

但是我总是在控制台上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/<此消息: 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/<

我不知道为什么它不起作用:

这是我重置用户密码的方式:

 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);
                    }
               });
            };

需要注意的是verificationCodenewPassword getted非常设置好的。 有谁知道该怎么办?

在GitHub上看看: https : //github.com/aws/amazon-cognito-identity-js/issues/381

尽管这里出现了与错误消息格式相同的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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