Skip to content

Conversation

@alec-w
Copy link

@alec-w alec-w commented Jan 4, 2023

Fixes #360

Adds the given_name and family_name attributes into the id token.

In our project making use of cognito-local (thanks for this) this addressed the problem for us.

Guidance would be helpful on whether this is indeed the correct fix and how the tests should be modified to prevent a future regression on these attributes (typescript not being my forte).

@jagregory
Copy link
Owner

I think this looks fine. Ideally, we'd have a canonical list of attributes which are supposed to be exposed via the tokens and then we could write tests which verify they're exposed (if they're set on the user), but unless someone volunteers to do that I'm happy to just merge.

@cirnatdan
Copy link

@jagregory is it possible to merge this now? Btw Cognito actually exposes given_name and family_name only if they are set as required attributes

@hugo-abhishek
Copy link

hugo-abhishek commented Jun 4, 2025

@jagregory Are we planning to merge this?
@alec-w Will it be possible for you to include preferred_username as well? We have use this attribute in one of our projects and this would be really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ID token does not include attributes such as given_name, family_name, or preferred_username

4 participants