Cognito sends verification code even after changing verification message to link in the console

1

I am working on a workflow for my Cognito user pool to allow users to change their email. So far I have it working to where the email change is pushed to Cognito using AdminUpdateUserAttributes and a verification email is sent to the user at the new email.

public async Task AdminUpdateUserEmail (
            string username,
            string userPoolId,
            string email)
{
    AdminUpdateUserAttributesRequest adminUpdateUserAttributesRequest = new AdminUpdateUserAttributesRequest
    {
        Username = username,
        UserPoolId = userPoolId,
        UserAttributes = new List<AttributeType>
        {
            new AttributeType()
            {
                Name = "email",
                Value = email
            }
        }
    };

    AdminUpdateUserAttributesResponse adminUpdateUserAttributesResponse = adminAmazonCognitoIdentityProviderClient
        .AdminUpdateUserAttributesAsync(adminUpdateUserAttributesRequest)
        .Result;
}

Initially we were sending a Code, but we are now wanting to test sending a link instead to see if it will make the workflow a bit easier. Ideally, sending the link will make it so the email verification will be handled by Cognito rather than by us using VerifyUserAttribute.

In order to change to using a link instead of a code, I went into my User Pool's Messaging tab and changed the Verification Message template to use Link instead of Code.

Verification Message Template

Even after making this change, however, I still receive a code when I try to change the email for an account.

Verification Code Email

Based on all the documentation I've seen, this seems to be an uncomplicated change and I've only seen one report of this issue when I was trying to find solutions online which wound up being tied to a third party so it wasn't really very helpful.

Am I missing a step or doing something wrong here? If there is anything else you need to help answer my question, let me know.

2 Answers
0

I've encountered the same issue, were you able to fix this?

Diogo
answered a year ago
  • I have not, so far nothing is working for me.

0

I have the same issue. This definitely looks like a bug.

I'm wondering if we can force the email verification with link when we use the AdminUpdateUserAttributesAsync function. In the meantime, I'm stuck on this flow.

Geo Gam
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions