Updating value of a required cognito attribute: Impossible?

1

Do the following:

  1. Create a cognito user pool where email is the sign-in and name and phone_number are required attributes (and allow self-registration).
  2. Use the hosted UI to register an account with the user pool. Be sure to make a typo in your phone number.
  3. Go to the console UI and try to edit the phone number. Note that it is greyed out and uneditable.
  4. Try using aws cognito-idp admin-update-user-attributes to update the phone number. Note that you get an "(InvalidParameterException) when calling the AdminUpdateUserAttributes operation: user.phone_number: Attribute cannot be updated." error.
  5. While logged in as the user, try to use the cognitoidentityserviceprovider.updateUserAttributes API call to update the phone number. Note that you once again are told that the phone_number attribute cannot be updated.

Is there any way to fix the user's phone number in this case? I did see https://repost.aws/questions/QUnbai89EJThyvfcvTMxgoxQ/allow-a-user-to-fix-phone-number-attribute-during-sign-up , but before I go blow up my entire user pool an re-create it with no phone_number requirement I thought I'd double-check and see if there was any other solution.

noah10
已提问 2 年前110 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则