question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Cognito] Auto-confirm user AND send verification code

See original GitHub issue

Which Category is your question related to? User attribute verification

What AWS Services are you utilizing? Cognito

Provide additional details I’ve got a pre-sign up lambda that auto-confirms a user but that does not auto-verify the user’s email. Auto-confirming results in no verification email being sent to the user. From what I can tell, in order for a verification email to be sent in this scenario, the Auth.verifyCurrentUserAttribute method must be used. I’m wondering if there is a way to have a sign up verification email sent regardless of whether a user has been auto-confirmed. My primary motivation behind this is custom messaging: upon signing up (CustomMessage_SignUp), a user should receive a welcome email with a verification code in it, but upon requesting a verification code (CustomMessage_VerifyUserAttribute), a user should receive a verification request email.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:20 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
haverchuckcommented, Nov 26, 2019

@Palisand I’m closing this issue due to inactivity. I believe that this is what you would want. You could probably have a single trigger both send the email and mark a user as confirmed.

6reactions
geddawicommented, Jan 20, 2020

There is a huge setback with this scenario:

  1. Step 1: User needs to signup and get a confirmed account right away (not a confirmed email; this will be prompted by the application to unlock extra features and extend usability etc) At this point user can sign in but is a limited user.
  2. Step 2: User is sent a standard and very common welcome email + verification link (created with the verification code and embedded into an API Gateway URL as a parameter that is then processed to verify the email since Cognito still does not support verification links)
  3. Step 3: User clicks on the link and now has both a verified account and a verified email.

This is not possible since we can’t get the signup custom message trigger to fire after the user is auto-confirmed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signing up and confirming user accounts - Amazon Cognito
A verification code that Amazon Cognito sends to that email address or phone number. If 24 hours have passed and your user's code...
Read more >
Confirm AWS Cognito signups automatically
In today's tutorial, I will share how to automatically confirm users in your application without sending the confirmation code.
Read more >
How to autoVerifyEmail in aws cognito after the user is signed ...
In a Cognito post-confirmation trigger, I am sending a CustomVerificationEmail using SES to have him verify the email address. When the user ......
Read more >
Allow registrations with auto-confirm/verify [#3044370] - Drupal
The default Cognito registration flow is to require a confirmation code to be sent to the users email or mobile, this is then...
Read more >
Cognito confirm user
The confirmation code sent by a user's request to confirm registration. ... before Amazon Cognito signs up a new user. you want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found