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

Created on 1 Oct 2020  路  8Comments  路  Source: aws/aws-cdk


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: Bug Report

@aws-cdaws-cognito bug

Most helpful comment

@jukkasi - this is language taken from Cognito documentation -

"Amazon Cognito can automatically verify email addresses or mobile phone numbers by sending a verification code鈥攐r, for email, a verification link."

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

All 8 comments

I have exactly same problem, unable to set verification Email with settings described above.

It is always "No verification" no matter what.

see the screenshot

The screenshot link doesn't work. Can you update the link?

@nija-at Link updated with screenshot

@apoorvmote - you've configured the email property under autoVerify to be false. This is consistent with what you're seeing on the console.

See the description here.

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

@jukkasi - this is language taken from Cognito documentation -

"Amazon Cognito can automatically verify email addresses or mobile phone numbers by sending a verification code鈥攐r, for email, a verification link."

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

@nija-at Yes removing autoVerify fixed the issue. I am closing the issue. Please fix the language in documentation by making this more explicit.

鈿狅笍COMMENT VISIBILITY WARNING鈿狅笍

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artyom-melnikov picture artyom-melnikov  路  3Comments

nzspambot picture nzspambot  路  3Comments

vgribok picture vgribok  路  3Comments

schof picture schof  路  3Comments

eladb picture eladb  路  3Comments