AWS - Amplify - I am using AWS Cognito and AWS Amplify library with React application (backend: NodeJS) and users are doing login with email. I want to change the user's email using amplify from the front end.
I used this: updateUserAttributes
1. updateUserAttributes() → old email changed to new email, email_verified: false
2. Sent verification code to the new email address
3. When I click the verification code on the mailbox, change to email_verified: true
In this case, if users sent the verification code to the wrong email by mistake, the user can't use and verify the account. Because this user's email changed on the AWS cognito user pool.
So users must continue using the old email before verifying the new email. I want to make it like this:
1. Send verification code to the new email address
2. When I click the verification code on the mailbox, the old email change to a new email
and email_verified: true
Understand? I want to change the email after clicking the verification code. How can you help me?