【问题标题】:Cognito User AWS forget password step errorCognito 用户 AWS 忘记密码步骤错误
【发布时间】:2017-10-09 10:58:17
【问题描述】:

我正在使用来自 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 f c/< 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 设置得很好。 有谁知道怎么做?

【问题讨论】:

    标签: javascript angularjs amazon-web-services amazon-cognito aws-cognito


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2022-08-13
      • 2018-02-22
      • 1970-01-01
      • 1970-01-01
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      • 2020-08-06
      • 2012-01-07
      相关资源
      最近更新 更多