Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable verification for some user in Amazon Cognito?

Amazon Cognito sends verification code automatically if verification feature activated. In my project, sometimes, I will add users(Signup function in AWS Java SDK) and verify them by AdminConfirmSignup myself, so I do not want them to receive verification mail. I will send them customized email manually.(Not using custom lambda in cognito)

If I write pre-signup lambda function and verify the user at that stage, do they still get a verification email?

How can I achieve my goal?

like image 753
endertunc Avatar asked Aug 15 '16 07:08

endertunc


People also ask

How do I verify a Cognito user?

When a user updates their email address or phone number in your app, Amazon Cognito immediately sends a message with a verification code to a user if you configured your user pool to automatically verify that attribute. The user must then provide the code from the verification message to your app.

How do I change the attributes of an Amazon Cognito user pool after creation?

Short description. You can't change standard user pool attributes after a user pool is created. Instead, create a new user pool with the attributes that you want to require for user registration. Then, migrate existing users to the new user pool by using an AWS Lambda function as a user migration trigger.


1 Answers

Using pre-signup Lambda trigger you can auto-confirm the user. In this case they will not get a confirmation email. You can find the pre-signup example with auto confirm in this docs.

Basically, you set the autoConfirmUser flag to true in the event response.

like image 137
Vinay Kushwaha Avatar answered Oct 10 '22 12:10

Vinay Kushwaha