FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
90 stars 12 forks source link

Locale query parameter isn't preserved on redirection #2328

Closed MathieuMathurin closed 4 months ago

MathieuMathurin commented 1 year ago

Locale query parameter isn't preserved on redirection.

Description

On the Forgot password flow. When opening an expired link having a locale query parameter in it. We are redirected to /password/forgot form without the locale query parameter.

The form is then rendered in a multi-language context.

Affects versions

1.45.2

Steps to reproduce

Steps to reproduce the behavior:

  1. With a tenant having an i18n Forgot password template
  2. With a tenant having an email template for locale FR. 2.1 The email templates includes the forgot password URL with the locale query param locale=fr
  3. Initiate Forgot password flow with a valid user having preferred locale French
  4. Wait 10 minutes for the link to be expired
  5. Click the link in the email.

Expected behavior

The locale query parameter should be included in the 302 redirect location header.

Screenshots

If applicable, add screenshots to help explain your problem.

Translated error, but not translated form

image

Request URL

image

Response Headers

image

Translated form when locale=fr query param is in the URL

image

Platform

(Please complete the following information)

Community guidelines

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

Additional context

Release Notes

If a user starts a forgot-password flow, and clicks on a change password link in an email after the change password Id has expired, the redirect back to the original Forgot Password form will not carry along a locale parameter. This fix ensures that a locale setting, when present in the change password link, is preserved.

andrewpai commented 5 months ago

Internal: