1
votes

My use case:

I want to signup the user in AWS Cognito and want the user to continue through the process without verifying email during the signup process.

To achieve this, I am letting the user continue the process by adding "autoConfirmUser": "true" in Cognito Presignup trigger

In a Cognito post-confirmation trigger, I am sending a CustomVerificationEmail using SES to have him verify the email address.

When the user verifies his email (Status = verified) in SES, I would like to update the EmailVerified to true in Cognito. (Later for forgot password use-case)

How can I achieve this programmatically? Like a Lambda or something triggered by SNS?

I do not want to use AWS CLI like it mentioned in, AWS Cognito - User stuck in CONFIRMED and email_verified = false

1

1 Answers

2
votes

Please add autoVerifyEmail to true in Cognito Presignup trigger.

Observe this referance

Example code in nodejs

"use strict";

exports.handler = async (event) => {
    event.response.autoConfirmUser = true;
    event.response.autoVerifyEmail = true; 
    return event;
};