Sign In with Apple not sending attributes for users who have previously signed in

0

My orginization recently moved to Cognito for user authentication and was previously using native sign in with apple. For the users who had used Sign In with Apple before the move to Cognito, they are experiencing an error:

"Invalid user attributes: family_name: Attribute is required. Invalid user attributes: given_name: Attribute is required."

It seems that when going through the Sign In with Apple flow with a user that already exists - but does not exist in Congnito yet - Apple is not providing the firstName and lastName attributes in the token. As a workaround I have set family/given_name to map to the "sub" attribute but this is not an ideal solution long term. What are my options here?

已提问 2 年前237 查看次数
1 回答
0

You need to configure the Custom Attributes within the User Pool. To achieve this, you would need to go into Cognito > UserPoolName > Sign-Up Experience > Custom attributes > Add the custom Attributes that the app requires (that Apple used to pass). These custom attributes can then be leveraged in the app client configuration.

Something important to mention, is that if you require to include these attributes in the token, you would need to create a Post-Authentication Lambda to include the required attributes within the Token being passed to the application.

AWS
已回答 2 年前

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

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

回答问题的准则