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

Update middleware to account for redirect after MSCA login #626

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

krischarbonneau
Copy link
Contributor

@krischarbonneau krischarbonneau commented Apr 23, 2024

ADO-192855

Fixed AB#192855

Changelog

fix: Update middleware to handle MSCA redirect

Description of proposed changes:

This PR updates our middleware to handle the redirect from MSCA after logging in. Since the recent changes to the ARB in dev, Stream 3 has been redirecting to /&Lang=eng or /&Lang=fra depending on the language selected before redirecting. This PR adds a couple rules at the top of the stack in our middleware that checks for this and redirects to the respective dashboard page.

What to test for/How to test

  1. Pull in branch
  2. Type npm run dev
  3. Try navigating to /&Lang=eng (casing is important here as the parameter passed to us is uppercase Lang). You should be redirected to the English dashboard
  4. Try navigating to /&Lang=fra. You should be redirected to the French dashboard

Additional Notes

In the future we should look into leveraging the NEXT_LOCALE cookie to handle locale redirection. More info can be found here: https://nextjs.org/docs/pages/building-your-application/routing/internationalization#leveraging-the-next_locale-cookie

@krischarbonneau krischarbonneau requested a review from a team as a code owner April 23, 2024 16:52
Copy link

@krischarbonneau krischarbonneau merged commit 81117ed into dev Apr 24, 2024
8 checks passed
@krischarbonneau krischarbonneau deleted the 192855-redirect-fix branch April 24, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants