Closed soullivaneuh closed 2 months ago
Can you use a lambda to accomplish this? The language and timezone are on the user object.
@robotdan I'm sorry I quite don't understand you. :-/
What do you mean by using a lambda? Have you any example to provide?
Here is the lambda doc. https://fusionauth.io/docs/v1/tech/lambdas/jwt-populate
The JWT Populate allows you to add additional claims to the access token JWT or the id token JWT.
The Userinfo endpoint takes an Access Token and returns the payload of the JWT in addition to some other registered user claims.
Adding additional information to the JWT using the JWT populate will give you the additional claims on the Userinfo response.
Yes, this is quite what I mean of what I wrote on the workaround section.
But as I don't use the JWT, I would like to simplify the process.
Why can't we have this information directly from the oauth endpoint? If we can have the phonenumber, why not other useful info like preferred languages and timezone?
I need it only to adjust the locale language and timezone values of my app.
It looks like the requested claims (locale, zoneinfo) are part of the standard: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
Right now the recommended workaround is to use a JWT and a lambda, as Daniel suggested. The lambda gives you a lot more flexibility, but I understand that if you aren't using JWTs it may not work. You could also use the API to get information about the user: https://fusionauth.io/docs/v1/tech/apis/users#retrieve-a-user
I'll mark this as an enhancement request.
We unfortunately can't commit to any timeline right now due to other priorities, unless you choose to engage us in a professional services agreement (more on that here: https://fusionauth.io/community/forum/topic/51/i-need-feature-abc-and-am-willing-to-pay-you-to-build-it-how-can-i-get-in-touch )
This is addressed in the upcoming 1.50.0 release. These values will be added when using a scope policy of Strict, and can be optionally added using the new userinfo lambda, too.
Add additional information to the oauth userinfo endpoint
Problem
I setup a very simple oauth login process for an app.
The app will copy some user information on connection. But I can't access to the preferred languages neither the timezone property:
Solution
Add those quite basic and useful fields!
Alternatives/workarounds
I may create a JWT token to call the FA API and get more information.
But I currently don't use the JWT feature, only the auth one.
I would be much simpler to me to have more information directly on the auth response.
Additional context
Add any other context or screenshots about the feature request here.
How to vote
Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.