AWS Cognito - TruncatingBigNumber не может быть преобразован в строку - PullRequest
1 голос
/ 08 апреля 2020
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 в электронном письме введите новый пароль и нажмите Отправить Cognito Show:

{code: "SerializationException", name: "SerializationException", сообщение: "class com.amazon.coral.value. json .numbers.TruncatingBigNumber не может быть преобразовано в строку"}

Может кто-нибудь помочь PLZ мне

...