【发布时间】:2020-04-08 04:50:09
【问题描述】:
我正在尝试通过反应和放大来实现经典的登录/注册。 我不想使用放大反应组件,而只想使用放大的 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);
}
};
错误是由signUp后调用signIn触发的
有人知道这个错误信息是什么意思吗?
【问题讨论】:
标签: amazon-cognito aws-amplify