-
Notifications
You must be signed in to change notification settings - Fork 4
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
UML-3121 make redirect uri dynamic #2390
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2390 +/- ##
=========================================
Coverage 92.03% 92.03%
Complexity 1463 1463
=========================================
Files 279 279
Lines 6655 6656 +1
=========================================
+ Hits 6125 6126 +1
Misses 513 513
Partials 17 17
Flags with carried forward coverage won't be shown. Click here to find out more.
|
9aa1b12
to
f88dd04
Compare
Scenario: I initiate authentication via one login in Welsh | ||
Given I am on the temporary one login page | ||
And I request to view the content in welsh | ||
When I click the one login button in welsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should ideally be When I click the login button
. The assertion on the language would then be in the Then.
The usefulness of the context files is that a step can create state that a later step can access. In this case you'd want to set the locale in the context when you request to view the content in welsh.
Purpose
Make redirect_uri use the correct domain depending on environments
Fixes UML-3121
Approach
Uses the Mezzio serverUrlHelper and urlHelper classes in service-front and passes this down to service-api.
Learning
The
$redirectUrl
being passed from the frontend to the api needs to match theredirect_url
set in the docker dependencies file.Selecting Welsh modifies the URL by adding '/cy/'. We have removed this from the redirectUrl to make this match.
The ui_locale value is stored in the AuthSession to allow returning from one login to a welsh page if selected.
Checklist