- Newest
- Most votes
- Most comments
Hello,
Hope all is well on your end.
Thank you for reaching out to us with your feedback pertaining to the Amazon Cognito userInfo endpoint returning the email_verified body element as a string rather than a bool.
Currently, this is a limitation with Cognito as Cognito does not return email_verified attribute as a Boolean, it instead returns it as a string. We have heard this request from other customers and will consider it in future updates to the service. I would like to inform you that this is not an error but its current limitation from Cognito side and I really apologize for any inconvenience caused to you due to the service limitation.
We do have an existing feature request with service team for this limitation however I will not be able to provide you an ETA when this feature would be released as we do not have insight to the roadmaps of the internal team. However, I do encourage you to monitor our What's New page and AWS blog as all of our feature announcements are made there.
- What's New - https://aws.amazon.com/new/
- Blog - https://aws.amazon.com/blogs/aws/
A probable workaround to this is to get the same information from the ID token payload where email_verified is returned as a bool [1] however you have already implemented your own workaround to overcome this.
[1] ID token default payload - https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-id-token.html#user-pool-id-token-payload
Kind regards.

Thank you, Qasim,
Unfortunately our federating partner uses a pre-built OIDC client that expects the ID provider to respect the specification, including having a valid /userinfo, but as mentioned we do have a (hacky) workaround.
Surely though this shouldn't be considered a feature request but a bug fix? Because of this Cognito is actually broken: the OIDC feature is unusable as-is. Having your implementation of a protocol match the specification is not a "nice to have," but a necessity I would think?