Update mobile number during login if MFA is required in cognito and only sms mfa is allowed

37 views Asked by At

I have a scenario where the users can only have SMS MFA. I would like to allow the user to add their mobile number during login if they don't have a mobile number already if the user pool has MFA required, currently I don't find a way to do that. I am trying to use updateUserAttributes call but I get user is not authenticated error.

I see this is being done in the hosted UI not sure how to replicate it with amplify/cognito client libraries.

0

There are 0 answers