小编Ern*_*nes的帖子

未配置自定义身份验证 lambda 触发器

我正在尝试使用反应和放大来实现经典的登录/注册。我不想使用 amplify-react 组件,而只想使用 amplify 的 Auth 方法。

我还想自动确认用户,因此我插入了一个预注册 lambda 函数。一切正常,但我仍然有这个错误。

我尝试拔掉我的自定义 lambda 函数,但没有任何效果。

这是我的功能:

  handleClick = async () => {
    try {
      await Auth.signUp({
        username: this.state.username,
        password: this.state.password,
        attributes: {
          email: this.state.email,
        },
      });
      await Auth.signIn({ username: this.state.username, password: this.props.password });
    } catch (err) {
      console.error(err);
    }
  };
Run Code Online (Sandbox Code Playgroud)

该错误是由注册后调用 SignIn 触发的

在此输入图像描述

有谁知道这个错误消息是什么意思?

amazon-cognito aws-amplify

4
推荐指数
1
解决办法
4960
查看次数

标签 统计

amazon-cognito ×1

aws-amplify ×1