LG-15833: Maintain partner link when session times out at sign-in#11930
Merged
LG-15833: Maintain partner link when session times out at sign-in#11930
Conversation
changelog: Bug Fixes, Sign-In, Maintain partner link when session times out at sign-in
Why: 1. To simplify stubbing tests to simulate very short session timeout (e.g. 1 second) to avoid delays in tests waiting 2. For alignment with related `session_timeout_warning_seconds` config 3. To allow more granular control over session durations
e.g. they might be partially signed-in at the MFA step, but in that case we'd still want to bring them back to the sign-in page, since the SessionsController is where the request_id is maintained
This should be assigned through session_timeout_in_seconds, but it may already be cached by the time we've assigned the stub on IdentityConfig
Contributor
Author
|
I'm marking this ready for review. A few notes about the implementation:
|
aduth
commented
Feb 28, 2025
| </div> | ||
| <%= render ButtonComponent.new( | ||
| type: :button, | ||
| url: new_user_session_url(timeout: :session, request_id: sp_session[:request_id]), |
Contributor
Author
There was a problem hiding this comment.
This is intentionally identical to the URL used for the fully-authenticated session expiration redirect URL:
The thought being that we could get rid of session-timeout-ping.ts in favor of session-expire-session.ts, and it would "just work" the same way.
Contributor
Author
kevinsmaster5
approved these changes
Feb 28, 2025
Contributor
kevinsmaster5
left a comment
There was a problem hiding this comment.
Looks good and local testing has no issues.
I'm curious about the switch to seconds vs. minutes for the timing.
Contributor
|
Also the config value changes to
|
Contributor
Author
|
@kevinsmaster5 There's some notes about the config change in my earlier comment #11930 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🎫 Ticket
LG-15833
🛠 Summary of changes
Fixes an issue where the partner request details are lost if the user clicks "Continue sign in" at sign-in after the session has already expired.
The approach here is to change "Continue sign in" to be a plain link element with the
request_idas an added parameter of the current page, and limit the behavior of the JavaScript to only override this behavior while the session is still assumed to be active. When the session expires, the JavaScript won't do anything, and will allow it to behave as a normal link, refreshing the page with therequest_id. The sign-in page controller is already set up to interpret and save therequest_idparameter.Review is simplified by reviewing changes with whitespace hidden: https://github.com/18F/identity-idp/pull/11930/files?w=1
📜 Testing Plan
It's easiest to test by shortening your session timeout via configuration, so you don't have to wait a full 15 minutes:
A few other scenarios to consider: