【问题标题】:AWS Cognito- TruncatingBigNumber can not be converted to an StringAWS Cognito-TruncatingBigNumber 无法转换为字符串
【发布时间】: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


    【解决方案1】:

    我在确认密码时遇到了同样的问题,问题是我将验证码作为数字发送,当我将其转换为字符串时它起作用了

    【讨论】:

      猜你喜欢
      • 2020-09-06
      • 1970-01-01
      • 2022-01-13
      • 2012-09-19
      • 1970-01-01
      • 1970-01-01
      • 2021-11-15
      • 2018-02-19
      • 2012-01-07
      相关资源
      最近更新 更多