amazon-web-services - 用户注册后如何在 aws cognito 中自动验证电子邮件。稍后状态后在 Cognito 中验证电子邮件

标签 amazon-web-services amazon-cognito email-verification email-confirmation

我的用例:

我想要在 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/

相关文章:

java - 如何通过在java中发送邮件来验证电子邮件地址是否确实存在

amazon-web-services - Amazon SES 是否需要存在我的发件人地址

amazon-web-services - AWS Secrets Manager 异常访问被拒绝

amazon-web-services - DynamoDBleadingKeys 限制的 IAM 策略 Cognito 变量

java - Selenium WebDriver (JAVA) 中 gmail 帐户的电子邮件验证

php - 使用 codeigniter 验证电子邮件

.net - 有人在 Amazon Elastic Beanstalk 上为 .NET 运行过单声道吗?

amazon-web-services - 如何在 AWS API Gateway 中不返回任何内容?

amazon-web-services - cognito-idp admin-update-user-attributes 在尝试更新自定义属性时出错

amazon-web-services - AWS 放大 : How to map social providers attributes for an email based authentication?