[英]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);
}
});
};
需要注意的是verificationCode
和newPassword
getted非常設置好的。 有誰知道該怎么辦?
在GitHub上看看: https : //github.com/aws/amazon-cognito-identity-js/issues/381
盡管這里出現了與錯誤消息格式相同的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.