【发布时间】:2021-07-30 15:11:33
【问题描述】:
我有以下代码
Auth.completeNewPassword(
user,
this.profileForm.get('newPassword')?.value,
{
"phone_number": String(this.profileForm.get('phone')?.value),
"given_name": this.profileForm.get('fName')?.value,
"family_name": this.profileForm.get('lName')?.value,
"locale": this.profileForm.get('language')?.value,
"custom:role": "user" // Error when this line is added
}
)
.then(data => console.log("Changed Password! -->", data))
.catch(err => console.log("Password change failed: ", err));
它在custom:role 行失败,我收到以下错误:
`Input attributes include non-writable attributes for the client XXXX`
此外,在 Cognito 中,角色属性不会显示为必需属性。我该如何设置?
【问题讨论】:
标签: angular aws-amplify