Custom attribute not passed into ID_TOKEN created by AWS Cognito

前端 未结 2 897
孤街浪徒
孤街浪徒 2021-02-07 06:01

I am not able to get custom attribute in ID_TOKEN returned from AWS Cognito after successful user login.

Steps I tried :

1.Created user pool 2.C

2条回答
  •  清酒与你
    2021-02-07 06:12

    I had the same trouble and your question came up when I was searching for a solution.

    My custom attributes started to appear in ID token when I enabled profile scope in 'App client settings'. (available at: AWS console-> 'User pools'-> click your pool -> 'App client settings' -> 'Allowed OAuth Scopes')

    (BTW: I was misled by this sentence from the documentation: "The openid scope returns all user attributes in the ID token that are readable by the client". In my case openid scope was not enough.)

提交回复
热议问题