Set UI locale when triggering change password email flow

I want to use the following API to allow the user to trigger the reset password email from within the app (POST /dbconnections/change_password). I am using new universal login.

When triggering login / signup flows, I am using ui_locales to make the auth0 interface match the selected language in our app.

Can I set the language when triggering the password reset flow? I’m worried that the user will end up with a different language to the one selected in the application which isn’t a great UX.

Hi @nicholas.peters,

Welcome back to the Auth0 Community and sorry for the late reply.

While it is possible to use ui_locales to set the language in the initial login/forgot password page, passing the ui_locales parameter in the URL link to the /u/reset-password page is not possible out of the box, as mentioned in our Knowledge article as well.

In this case, the link that is returned in the URL ends with a hash mark (#). Therefore, the browser’s Accept-Language header will take precedence and possibly display a different language. Using built-in methods of Liquid Syntax, it is possible to remove and add characters from a string. This would be an example :

<a href=“{{ url | remove: “#” }}&ui_locales=fr-FR”>Click here

I hope this helps your use case, but others as well.
Thanks,
Remus

`

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.