Skip to content
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

Locale not included in User Create webhook #1693

Closed
glen-84 opened this issue Apr 20, 2022 · 6 comments
Closed

Locale not included in User Create webhook #1693

glen-84 opened this issue Apr 20, 2022 · 6 comments

Comments

@glen-84
Copy link

glen-84 commented Apr 20, 2022

Locale not included in User Create webhook

Problem

The user's specified or selected locale is not included in the User Create webhook.

Solution

For the user's specified or selected locale to be included in the User Create webhook.

Alternatives/workarounds

Saving it to a hidden field. Might not always be possible (if the value is not in the query string, if the locale cookie is changed to be HTTP-only, or if custom fields are not available).

Additional context

FusionAuth™ version 1.36.0.

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

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.

@mooreds
Copy link
Collaborator

mooreds commented Apr 21, 2022

This should be present in user.preferredLanguages.

How are you setting the locale? Can you provide step by step repro steps, please?

@glen-84
Copy link
Author

glen-84 commented Apr 21, 2022

While testing again, I noticed a different issue – if you hit an authorize URL with locale=th (f.e.*) in the query string:

  1. No cookie is set with this locale.
  2. The links (f.e. Create an account) do not include the locale, so they switch back to EN.

For the latter, it can probably be solved by including the locale in the link macro. I'm not sure about the cookie though – is that supposed to be set?

[*] I have a Thai localization in the selected theme.


If I append locale=th to the registration URL, the resulting event is:

array (
  'createInstant' => 1650563334654,
  'id' => '8f3dccdd-d31f-44e5-a278-6cac1715d222',
  'info' =>
  array (
    'deviceName' => 'Windows Chrome',
    'deviceType' => 'BROWSER',
    'ipAddress' => '172.18.0.1',
    'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36',
  ),
  'tenantId' => '5086fa1f-***7-4d9c-a59b-32bc0492912f',
  'type' => 'user.create',
  'user' =>
  array (
    'active' => true,
    'connectorId' => 'e3306678-a53a-4964-9040-1c96f36dda72',
    'email' => '***@gmail.com',
    'id' => '6a29570d-5472-4b95-8e48-cd6f55829dd3',
    'insertInstant' => 1650563334556,
    'lastUpdateInstant' => 1650563334556,
    'passwordChangeRequired' => false,
    'passwordLastUpdateInstant' => 1650563334621,
    'tenantId' => '5086fa1f-***7-4d9c-a59b-32bc0492912f',
    'twoFactor' =>
    array (
    ),
    'usernameStatus' => 'ACTIVE',
    'verified' => false,
  ),
)

No sign of the locale or preferred languages.

The new issue with maintaining the locale state is actually more important than this one, since we're using a different method to capture this information on the app side instead.

@mooreds
Copy link
Collaborator

mooreds commented May 4, 2022

Thanks @glen-84 , I filed an issue about your last comment, since that appears to be a bug.

@robotdan
Copy link
Member

Based upon the thread and discussion here #1738 - I think we can close this issue out?

@glen-84
Copy link
Author

glen-84 commented Jun 25, 2022

@robotdan Ya, if it's included in user.preferredLanguages when that issue is "fixed" 😉, then this will be resolved as well. Closing.

@glen-84 glen-84 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2022
@robotdan
Copy link
Member

robotdan commented Jul 6, 2022

Thanks @glen-84 - yes, we'll track #1738 to closure for this fix.

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

No branches or pull requests

3 participants