Search code examples
amazon-web-servicesamazon-cognitoaws-userpools

Add user attribute in IdToken AWS cognito Service


Consider I Have Following Attribute In user pool

  • username

  • first-name

  • last-name

  • location

How to add All attribute in IdToken after successful authentication


Solution

  • As per the ID Token specification, the response claim doesn't have these attribute values (user name, first & last name, location etc.).

    However, as part of the standard claim, you can get these attributes using USERINFO endpoint.

    ID Token