akr*_*247 2 amazon-web-services email-verification email-confirmation amazon-cognito
我的用例:
我想要在 AWS Cognito 中注册用户,并希望用户在注册过程中无需验证电子邮件即可继续完成该过程。
为了实现这一目标,我让用户通过在 Cognito Presignup 触发器中添加 "autoConfirmUser": "true" 来继续该过程
在 Cognito 确认后触发器中,我使用 SES 发送 CustomVerificationEmail 让他验证电子邮件地址。
当用户在 SES 中验证他的电子邮件(状态 = 已验证)时,我想在 Cognito 中将 EmailVerified 更新为 true。(稍后针对忘记密码用例)
我怎样才能以编程方式实现这一目标?比如 Lambda 或者 SNS 触发的东西?
我不想使用 AWS Cognito - 用户陷入已确认且 email_verified = false中提到的 AWS CLI
请在 Cognito Presignup 触发器中添加autoVerifyEmail为 true。
请遵守此参考
Node.js 中的示例代码
"use strict";
exports.handler = async (event) => {
event.response.autoConfirmUser = true;
event.response.autoVerifyEmail = true;
return event;
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5713 次 |
| 最近记录: |