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.

[aws-cognito] Cognito won't send verification email to verify new user email

See original GitHub issue

Cognito won’t send verification email to verify new user email.

Reproduction Steps

const authPool = new UserPool(this, 'myAuth', {
      userPoolName: 'my-auth',
      selfSignUpEnabled: true,
      signInAliases: {
        email: true
      },
      autoVerify: {
        email: false
      },
      standardAttributes: {
        email: {
          required: true,
          mutable: false
        }
      },
      passwordPolicy: {
        minLength: 12,
        requireSymbols: false
      },
      accountRecovery: AccountRecovery.EMAIL_ONLY
    })

What did you expect to happen?

Each time user signs up then they should receive verification email

What actually happened?

By going to aws console I found out the error see the screenshot below error - Imgur If I manually change it to verify attribute email on aws console then it works as expected.

There is no options that says which attributes do you want to verify on aws-congnito cdk api.

Environment

  • CLI Version : 1.65.0
  • Framework Version:
  • Node.js Version: 12.18.4
  • OS : Ubuntu 20.04
  • Language (Version): Typescript

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
nija-atcommented, Oct 13, 2020

@jukkasi - this is language taken from Cognito documentation -

“Amazon Cognito can automatically verify email addresses or mobile phone numbers by sending a verification code—or, for email, a verification link.”

The action ‘auto’ refers that Cognito should automatically verify the attribute.

3reactions
jukkasicommented, Oct 13, 2020

If what you say is correct then “autoVerify” is very confusing term because I understand it so that these attributes are automatically set to verified state when the user is created.

So “autoverify: email: false” means to me that user manually needs to confirm this attribute, meaning that email is send by Cognito which then requires user interaction.

EDIT: Setting “autoverify: email: true” fixes the problem, like described in documentation

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Cognito verification email not received by user account
If anyone else is facing this issue, it appears that you cannot send verification emails if you use SAML ...
Read more >
Configuring email or phone verification - Amazon Cognito
Amazon Cognito must verify a phone number or email address to confirm users and help ... a user can't sign in or receive...
Read more >
I haven't received my verification email. What can I do?
When you sign up for Cognito Forms with a new organization, you are required to verify your email address. Until your email is...
Read more >
Cognito verification code emails no longer being sent
Has anybody had an issue with forgotten passwords and Conito not sending the verification code via email to users? As far as I...
Read more >
Email settings for Amazon Cognito user pools
Before you can use your own email address, you must verify it with Amazon SES and ... Amazon Cognito can't send messages 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