-
Notifications
You must be signed in to change notification settings - Fork 14
[Bug]: userinfo endpoint returns outdated roles #2640
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
Comments
Currently the UserInfo endpoint is returning you the We could optionally return you the current roles instead of what is in the JWT. On one hand this seems more correct, but if you are using the Internal:
|
My thoughts exactly, I was wondering if there could be something like a param to configure the endpoint behavior. I'll wait for updates, thank you. |
After review this internally, I think the current behavior is correct, or at least it is the intended behavior. The reason for this behavior is that we are only returning claims that exist in the access token in order to represent the current state of the access token, or what the user would have access to if you provided your service with this token. So for the In any upcoming release we will be expanding our support for scopes. Specifically allow you to define custom scopes and then allowing the UserInfo endpoint to respond to those scopes using a lambda function. This means, for your specific use case, if you do actually want the most current value for the |
@robotdan Sorry for the long wait, I missed your reply somehow. I understand the reasoning behind your decision, it totally makes sense. |
I think he means to use the JWT populate lambda which can read roles from the registration and put them into the JWT. |
We released support for custom OAuth scopes in version We are going to leave the default behavior as it is, as reflecting the validated claims is the intent of our current implementation. |
What happened?
After changing, for example, the user full name or first name or any other user detail from the FusionAuth UI, if I then hit the
userinfo
endpoint, I get back the updated data. But if I change any user registration to add or remove any role and then hit theuserinfo
endpoint, I get the old roles array. I need to logout, get a new token, call theuserinfo
endpoint again, and then the roles array will be correct. It seems like the roles array is retrieved from the token sent with the request rather than fetching the updated one.Version
1.40.2
Affects Versions
No response
Related
The text was updated successfully, but these errors were encountered: