【发布时间】:2020-07-20 12:12:44
【问题描述】:
export class ChangePwComponent implements OnInit {
user = '';
code: string;
password:string;
// new_password:string;
message = '';
email = '';
toVerifyEmail: boolean = false;
signstatus: string = 'signin'
username: string;
userObject:any;
constructor(private authService: AuthService, private router: Router, private api: APIService, private cookieService: CookieService, private https: HttpClient) { }
ngOnInit() {
this.username = this.router.getNavigatedData();
console.log('username' + JSON.stringify(this.username));
console.log(environment.envName);
}
changePw(password: HTMLInputElement) {
const user = {
password: password,
}
console.log(user)
Auth.forgotPasswordSubmit(this.password,this.code, this.username)
.then(user => console.log(user))
.catch(err => console.log(err));
console.log(this.password)
console.log(this.username)
console.log("OTP---"+ this.code)
}
我正在尝试重置密码。在电子邮件中收集 OTP 后,输入新密码并按提交认知显示:
{code: "SerializationException", name: "SerializationException", message: "class com.amazon.coral.value.json.numbers.TruncatingBigNumber can't be convert to an String"} em>
有人可以帮我吗?
【问题讨论】:
标签: javascript amazon-cognito aws-amplify