AWS Cognito - User stuck in CONFIRMED and email_verified = false

user1432403 picture user1432403 · Aug 30, 2016 · Viewed 18.3k times · Source

How do I go about email verifying a user who is CONFIRMED yet email_verified is false?

The scenario is roughly an agent signs up user on their behalf, and I confirm the user through the admin call adminConfirmSignUp. At that point, the user cannot change their password because of the email_verified flag being false.

I can't call resendConfirmationCode because the user is already confirmed.

I can't call forgotPassword because the email_verified flag is false.

The best I can think of is deleting the user account and calling signUp (prompting them to re-enter their password or a new password), hence recreating their account.

Answer

LiorH picture LiorH · Sep 13, 2017

Using the AWS CLI you can update the email_verified attribute:

aws cognito-idp admin-update-user-attributes 
--user-pool-id eu-west-xxxxxx 
--username [email protected]
--user-attributes Name=email_verified,Value=true