1 Answer
- Newest
- Most votes
- Most comments
0
Can you console log what attributes you are trying to update? From the error you must have passed some attributes that are not supposed to be changed like email or similar.
Also Auth.updateUserAttributes expects that before you called Auth.currentAuthenticatedUser, in that case the user used as argument will be updated as a side effect with current user.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 8 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
so since i assumed properties that doesn't change just won't even attempt to be updated at first i tried to just pass whole object that looked like this { "sub": "<user id>", "identities": "[<your usual default config here>]", "email_verified": false, "email": "<email>, "name": "Aaa", "picture": "image.jpg" }
than i tried sending this
{ "sub": "<user id>", "email_verified": false, "email": "<email>, "name": "Aaa", "picture": "image.jpg" } that didn't worked either so i just sent this: { "name": "Aaa" } and it still doesn't work, can you tell me what i might be doing wrong ? i am passing user gathered from Auth module and no matter what i try to update cognito screams at me that i can't update identities attribute, any ideas what might be wrong here ?