Skip to content

LG-11463 LG-11722 Allow browser Back button from Enter Password step#9662

Merged
soniaconnolly merged 52 commits intomainfrom
doug-lg-11463-back-from-phone-step-cherrypicked
Nov 29, 2023
Merged

LG-11463 LG-11722 Allow browser Back button from Enter Password step#9662
soniaconnolly merged 52 commits intomainfrom
doug-lg-11463-back-from-phone-step-cherrypicked

Conversation

@soniaconnolly
Copy link
Contributor

@soniaconnolly soniaconnolly commented Nov 27, 2023

🎫 Ticket

LG-11463
LG-11722

🛠 Summary of changes

Allow the browser back button from Welcome up to visiting Enter Password. This includes RequestLetter from Verify by Mail, and the in-person Ssn and VerifyInfo controllers. If the user re-submits an earlier step, all future steps are cleared from the session.

Note: In-person VerifyInfo still prevents going back, and we'll address that in a separate PR.

Do not merge until #9645 is deployed, since we need all sessions to have pii_from_user/pii_from_doc available after VerifyInfo is submitted.

📜 Testing Plan

  • In application.yml, add in_person_proofing_opt_in_enabled: true to include the new HowToVerify controller in testing
  • Create account, start IdV
  • Use the back button liberally up to EnterPassword
  • Expect to be able to go back/forward without issues
  • Resubmit a step, try to jump forward past that step
  • Expect to be redirected back to the next step after the one submitted
  • On phone step, choose Verify by Mail
  • Request letter, enter password
  • Expect no longer to be able to to go back from LetterEnqueued ("Come back later") page
  • Sign in, expect to land on EnterCode
  • Try to jump to other pages in IdV, expect to stay on EnterCode
  • EnterCode, expect to see PersonalKey
  • Try to jump to other pages in IdV, expect to stay on PersonalKey
  • Complete PersonalKey
  • Create new account, start IdV
  • On HowToVerify, choose in person proofing
  • Repeat above steps
  • Expect to be able to go back until in-person VerifyInfo

@solipet solipet force-pushed the doug-lg-11463-back-from-phone-step-cherrypicked branch from a15461c to 5b7167b Compare November 27, 2023 23:17
@solipet solipet marked this pull request as ready for review November 28, 2023 00:02
@soniaconnolly soniaconnolly requested review from a team November 28, 2023 00:25
@soniaconnolly soniaconnolly force-pushed the doug-lg-11463-back-from-phone-step-cherrypicked branch from 33336e6 to 86c18f6 Compare November 28, 2023 16:25
@soniaconnolly soniaconnolly changed the title LG-11463 Allow browser Back button from Enter Password step LG-11463 LG-11722 Allow browser Back button from Enter Password step Nov 28, 2023
soniaconnolly and others added 20 commits November 28, 2023 12:17
changelog: User-facing Improvements, Identity Verification back button, Allow back button for Phone step
Added Idv::Session#ssn_step_complete? which checks whether verify_info step is complete.
Also add action: :new to PhoneController.step_info
Co-authored-by: Doug Price <douglas.price@gsa.gov>
The default of /idv was working until we got to /idv/by_mail/request_letter, so make the default
/idv and allow specifying a different module for RequestLetterController.step_info. Use the module
to build an absolute controller path in url_for.
Add ssn_or_applicant_ssn and pii_from_doc_or_applicant and pii_from_user_or_applicant to idv_session
to make Ssn and VerifyInfo pages work after pii is moved to idv_session.applicant
Remove :confirm_verify_info_step_needed before actions
adds restore_pii_from_doc and restore_pii_from_user

Co-authored-by: Alex Bradley <alexander.bradley@gsa.gov>
StepInfo now takes the controller class as a parameter in the
initializer, then converts the controller to the full string name,
including modules, for use in url_for. This disambiguates between remote
idv and in person for ssn and verify_info controllers.

Removed controller_module from StepInfo since the above make it
unneeded.

Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
Co-authored-by: Alex Bradley <alexander.bradley@gsa.gov>
Deleted clear_current_step! in favor of explicitly restoring the pii
from the applicant.
This is necessary to make a enter_password_controller_spec in person retry spec pass when touching
subject.idv_session. We suspect that when the code is running, it is using the cached profile, which
is fortunately identical to the newly-created retry profile.
And stop stubbing idv_session and applicant in enter_password_controller_spec
solipet and others added 5 commits November 28, 2023 12:19
@soniaconnolly soniaconnolly force-pushed the doug-lg-11463-back-from-phone-step-cherrypicked branch from f5aea13 to fbf66f9 Compare November 28, 2023 20:31
soniaconnolly and others added 11 commits November 28, 2023 13:07
Superseded by confirm_step_allowed
Last use of method, so method removed
This was the backstop for the previous back button PR, and is no longer needed
And move confirm_step_allowed under rate limit before action to match other controllers
Insurance for future changes even though there's nothing to clear now.
In flow_policy_spec, test undo_future_steps_from_controller! starting from enter_password
and resubmitting ssn.
…troller_name

Add a spec for full_controller_name
@matthinz
Copy link
Contributor

This looks good to me, thank you @soniaconnolly and @solipet for your hard work here.

@soniaconnolly soniaconnolly merged commit 84b0e2e into main Nov 29, 2023
@soniaconnolly soniaconnolly deleted the doug-lg-11463-back-from-phone-step-cherrypicked branch November 29, 2023 23:40
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