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개 답변
0

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

Diogo
답변함 일 년 전
  • 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
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠