Skip to content

LG-11461 LG-11462 LG-11467 Allow the browser Back button from Welcome to VerifyInfo#9589

Merged
soniaconnolly merged 27 commits intomainfrom
sonia-lg-11461-back-from-ssn
Nov 27, 2023
Merged

LG-11461 LG-11462 LG-11467 Allow the browser Back button from Welcome to VerifyInfo#9589
soniaconnolly merged 27 commits intomainfrom
sonia-lg-11461-back-from-ssn

Conversation

@soniaconnolly
Copy link
Contributor

@soniaconnolly soniaconnolly commented Nov 14, 2023

🎫 Ticket

LG-11461
LG-11462
LG-11467

🛠 Summary of changes

The Back button was previously allowed up to visiting DocumentCapture. Add functionality to allow the Back button after submitting DocumentCapture, up to visiting VerifyInfo. This includes changes to the DocumentCapture page, LinkSent page, Ssn page, Address page, and VerifyInfo page, primarily in the before_actions to use FlowPolicy.

idv_session.redo_document_capture should be unnecessary now. We are leaving that cleanup to a separate ticket.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Create account, start IdV
  • Play with the browser back & forward buttons
  • Confirm that you can freely go back and forward before submitting VerifyInfo
  • On DocumentCapture, you will not see your images, but your data is still in the session (you can still go forward)
  • When you resubmit any step, you can no longer go forward past that step and your data is no longer in session
  • When you submit VerifyInfo, you can't go back from Phone step (existing behavior)

soniaconnolly and others added 7 commits November 13, 2023 11:52
Co-authored-by: Doug Price <douglas.price@gsa.gov>
The individual page validations could affect the back button history, so simplify by splitting the specs.
Add StepInfo in VerifyInfo controller.
Remove :confirm_document_capture_not_complete before_action from early steps and replace with
:confirm_verify_info_step_needed to make the next barrier. Update specs.
It is no longer used from other controllers since it is removed from remote VerifyInfo

Co-authored-by: Alex Bradley <alexander.bradley@gsa.gov>
@soniaconnolly soniaconnolly marked this pull request as ready for review November 17, 2023 18:48
@soniaconnolly soniaconnolly requested a review from a team November 17, 2023 18:48
@soniaconnolly soniaconnolly changed the title LG-11461 LG-11462 Allow the browser Back button from Welcome to VerifyInfo LG-11461 LG-11462 LG-11467 Allow the browser Back button from Welcome to VerifyInfo Nov 17, 2023
Copy link
Contributor

@matthinz matthinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@soniaconnolly soniaconnolly requested review from a team and eileen-nava and removed request for a team November 20, 2023 16:13
@soniaconnolly soniaconnolly merged commit 546ba10 into main Nov 27, 2023
@soniaconnolly soniaconnolly deleted the sonia-lg-11461-back-from-ssn branch November 27, 2023 16:38
jmhooper added a commit that referenced this pull request Aug 15, 2024
The SSN show page includes Javascript for device profiling. To identify a device profiling transaction we set `threatmetrix_session_id` and render that alongside the Javascript that performs the device profiling. This UUID is used downstream to fetch device profiling results.

We observed that some users did not have a `threatmetrix_session_id` value in downstream steps. This appears to be because they submitted the "link sent" step which calls `undo_step` on the SSN step. Then, either due to network issues or an unusual path through the process they were able to submit the SSN form without re-rendering the SSN show page.

Investigating this we questioned why the `threatmetrix_session_id` needs to be deleted when the user submits earlier steps. It appears it was added in #9589 which configured the back button functionality from the SSN step back to other steps. It appears that the `threatmetrix_session_id` was set to `nil` there in order to return to the state that existed before the step was submitted and not because of a specific concern about stale IDs or anything like that.

In order to prevent the issue where users have a nil ID after viewing the SSN step but submitting later steps and proceeding without re-viewing the SSN step, this commit removes the code to reset the threatmetrix session ID. This should be fine since the old ID will represent a device profiling transaction for the current session which is ultimately the goal.

[skip changelog]
jmhooper added a commit that referenced this pull request Aug 21, 2024
The SSN show page includes Javascript for device profiling. To identify a device profiling transaction we set `threatmetrix_session_id` and render that alongside the Javascript that performs the device profiling. This UUID is used downstream to fetch device profiling results.

We observed that some users did not have a `threatmetrix_session_id` value in downstream steps. This appears to be because they submitted the "link sent" step which calls `undo_step` on the SSN step. Then, either due to network issues or an unusual path through the process they were able to submit the SSN form without re-rendering the SSN show page.

Investigating this we questioned why the `threatmetrix_session_id` needs to be deleted when the user submits earlier steps. It appears it was added in #9589 which configured the back button functionality from the SSN step back to other steps. It appears that the `threatmetrix_session_id` was set to `nil` there in order to return to the state that existed before the step was submitted and not because of a specific concern about stale IDs or anything like that.

In order to prevent the issue where users have a nil ID after viewing the SSN step but submitting later steps and proceeding without re-viewing the SSN step, this commit removes the code to reset the threatmetrix session ID. This should be fine since the old ID will represent a device profiling transaction for the current session which is ultimately the goal.

[skip changelog]
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.

3 participants