我正在尝试使用反应和放大来实现经典的登录/注册。我不想使用 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 触发的
有谁知道这个错误消息是什么意思?