我的用例:
我想要在 AWS Cognito 中注册用户,并希望用户在注册过程中无需验证电子邮件即可继续完成该过程。
为了实现这一目标,我通过在 Cognito 预注册触发器中添加 "autoConfirmUser": "true"来让用户继续该过程
在 Cognito 确认后触发器中,我使用 SES 发送 CustomVerificationEmail,让他验证电子邮件地址。
当用户在 SES 中验证他的电子邮件(状态 = 已验证)时,我想在 Cognito 中将 EmailVerified 更新为 true。 (稍后针对忘记密码用例)
如何以编程方式实现此目的?比如 Lambda 或者 SNS 触发的东西?
我不想像其中提到的那样使用 AWS CLI, AWS Cognito - User stuck in CONFIRMED and email_verified = false
最佳答案
请在 Cognito 预注册触发器中将 autoVerifyEmail
添加为 true。
观察这个referance
nodejs 中的示例代码
"use strict";
exports.handler = async (event) => {
event.response.autoConfirmUser = true;
event.response.autoVerifyEmail = true;
return event;
};
关于amazon-web-services - 用户注册后如何在 aws cognito 中自动验证电子邮件。稍后状态后在 Cognito 中验证电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62315689/