-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The retrieveUserInfoFromAccessToken doesn't return a UserResponse #54
Comments
That's a good catch. We should fix it here: https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/api/retrieveUserInfoFromAccessToken.json I think the correct object to return would be a |
UserInfoResponse is now defined as a |
@adriano-di-giovanni hmmm. The
https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse
https://openid.net/specs/openid-connect-core-1_0.html#JSONSerialization I'm no typescript expert, but this would seem to indicate that a record type is the correct type. Am I misunderstanding things? Is there an example of another typescript OAuth/OIDC library you can point me to that represents this object in a better way? |
The interface UserinfoResponse {
sub?: string;
name?: string;
given_name?: string;
family_name?: string;
// ...
} as defined in the spec:
https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims |
Thanks @adriano-di-giovanni I opened up two issues in our main issue repo for tracking this. The original issue you reported is definitely a bug. If you'd like to submit a PR against the client library changing that, we'd welcome it, otherwise we'll try to get that fixed soon. The suggestion here: #54 (comment) is a new enhancement and I filed that as well. Less sure about when that will be done (juggling quite a few priorities right now). |
@mooreds I thought the client library was generated. If so, what should be changed? |
It is generated, you are correct. For the bug, I think the change is as simple as modifying https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/api/retrieveUserInfoFromAccessToken.json to have a The feature is a bigger effort, not quite sure what needs to be done there, probably creating a new domain object. We generate our domain objects from our java domain objects, so that is work that would have to be done internally, as I'm not sure what else it would affect. |
The retrieveUserInfoFromAccessToken doesn't return a UserResponse
Instead, it returns a response that has the shape described in the docs
The text was updated successfully, but these errors were encountered: