Is it possible to pass a user's language code to the 'back to' button following password reset?

We’re building a localised SPA in React.

Our password-reset flow is:-

  • Create a password-change ticket using the Management API (we’re using the dotnet SDK)
  • Append the user’s language code to the ticket value, eg ui_locales=it
  • Email the updated token value to the user

This works as expected. The password reset flow is presented to the user in their preferred language.

Our application and tenant are configured with a Login Uri, so the ‘return to’ button is displayed when the user’s password has been reset successfully. However, we cannot pass the user’s language code to the subsequent login flow.

When we pass the client_id to the create password-change-ticket, the user is presented with a Back to [Application Name] button. The user’s ui_locales value is lost. The login flow starts in the default language, English.

We tried passing the result_url to the create password-change-ticket with the appropriate ui_locales value. The user is presented with a Back to All Applications button. The user’s ui_locales value is lost. However, we now understand the result_url value is ignored as we’re using the new universal login; the link in the button is populated from the Tenant’s login uri setting.

So, my question is, how can I append the user’s language to the login uri value? Is it possible using a custom action?

Thanks