Skip to content

Resend Code on SignUp doesn't resend the code (using Cognito emailing) #6678

@guy-ecton

Description

@guy-ecton

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Authenticator

How is your app built?

Vite, Amplify UI (no Amplify BE)

What browsers are you seeing the problem on?

No response

Which region are you seeing the problem in?

us-east-1

Please describe your bug.

  • using
  • using alias_attributes = ["email"]
  • using Amplify UI only (no Amplify BE)

Signup works, user gets 6 digit code to the email.

User clicks "Resend Code".
User doesn't get another email with new code.

What's the expected behaviour?

User should get another email with a new 6 digit code.
I checked, emails don't go to spam.
New signup (to the same email after I delete it from Cognito) does get the first email.

The HTTP that gets sent upon clicking Resend Code:

POST https://cognito-idp.us-east-1.amazonaws.com/
x-amz-target: AWSCognitoIdentityProviderService.ResendConfirmationCode
payload: {
  ClientId:"f7gir36xxxxxxxxxxxx",
  Username: "[email protected]"
}

and it returns with 200OK with:

{"CodeDeliveryDetails":{"AttributeName":"email","DeliveryMedium":"EMAIL","Destination":"h***@b***"}}

Help us reproduce the bug!

  1. Cognito User Pool
  2. alias_attributes = ["email"]
  3. email verification code send by Cognito (haven't tried with SES yet)
  4. Use Amplify UI
<Authenticator components={{handleSignUp}}>...</Authenticator>
  1. Signup with email+password (username is generated as a random UUID4 string)
const handleSignUp: typeof signUp = async (data) => {
  const uuid = crypto.randomUUID()
  data.username = uuid
  return await signUp(data)
}
  1. see 1st email with code
  2. click Resend Code
  3. 2nd email doesn't arrive

Code Snippet

// Put your code below this line.

Console log output

No response

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions