Amazon cognito - user attributes in ID Token

0

Setting user attributes values in cognito user pool, causes those attributes to be present in the IDToken. How can I select which user attributes actually go into the ID Token? Via lambda trigger and no UI or API operation for that definition? Tks, DD

HC
已提問 1 年前檢視次數 274 次
1 個回答
1

Hello,

In order to stop an attribute from being present in the ID token, you need to unselect that attribute from the list of readable attributes for the app client.

Please expand the "Attribute permissions and scopes" section in document [1] for reference to attribute read/write settings in an Cognito user pool app client. You need to modify the "Set attribute read and write permissions" settings (if you are using old Cognito console) or the "Edit attribute read and write permissions" settings (if you are using new Cognito console).

After you unselect an attribute from this list, that attribute will no longer be present in the ID token.

I believe the information is helpful to you. In case you have any further queries/concerns then please let me know.

--References--

[1] https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html

AWS
支援工程師
Tarit_G
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南