diff --git a/app/controllers/idv/document_capture_controller.rb b/app/controllers/idv/document_capture_controller.rb index 57f15a18acc..e7694c26060 100644 --- a/app/controllers/idv/document_capture_controller.rb +++ b/app/controllers/idv/document_capture_controller.rb @@ -50,7 +50,6 @@ def extra_view_variables flow_path: 'standard', sp_name: decorated_sp_session.sp_name, failure_to_proof_url: return_to_sp_failure_to_proof_url(step: 'document_capture'), - skip_doc_auth: idv_session.skip_doc_auth, skip_doc_auth_from_how_to_verify: idv_session.skip_doc_auth_from_how_to_verify, skip_doc_auth_from_handoff: idv_session.skip_doc_auth_from_handoff, opted_in_to_in_person_proofing: idv_session.opted_in_to_in_person_proofing, @@ -70,7 +69,6 @@ def self.step_info # mobile idv_session.skip_doc_auth_from_handoff || idv_session.skip_hybrid_handoff || - idv_session.skip_doc_auth || idv_session.skip_doc_auth_from_how_to_verify || !idv_session.selfie_check_required || # desktop but selfie not required idv_session.desktop_selfie_test_mode_enabled? diff --git a/app/controllers/idv/how_to_verify_controller.rb b/app/controllers/idv/how_to_verify_controller.rb index 17975d9fdda..51acfcb6b8e 100644 --- a/app/controllers/idv/how_to_verify_controller.rb +++ b/app/controllers/idv/how_to_verify_controller.rb @@ -34,13 +34,11 @@ def update if result.success? if how_to_verify_form_params['selection'] == Idv::HowToVerifyForm::REMOTE idv_session.opted_in_to_in_person_proofing = false - idv_session.skip_doc_auth = false idv_session.skip_doc_auth_from_how_to_verify = false redirect_to idv_hybrid_handoff_url else idv_session.opted_in_to_in_person_proofing = true idv_session.flow_path = 'standard' - idv_session.skip_doc_auth = true idv_session.skip_doc_auth_from_how_to_verify = true redirect_to idv_document_capture_url end @@ -65,8 +63,8 @@ def self.step_info idv_session.service_provider&.in_person_proofing_enabled end, undo_step: ->(idv_session:, user:) { - idv_session.skip_doc_auth = nil idv_session.skip_doc_auth_from_how_to_verify = nil + idv_session.skip_doc_auth = nil idv_session.opted_in_to_in_person_proofing = nil }, ) diff --git a/app/controllers/idv/hybrid_handoff_controller.rb b/app/controllers/idv/hybrid_handoff_controller.rb index ae41a608240..badaf2cdc3b 100644 --- a/app/controllers/idv/hybrid_handoff_controller.rb +++ b/app/controllers/idv/hybrid_handoff_controller.rb @@ -48,9 +48,11 @@ def self.selected_remote(idv_session:) if IdentityConfig.store.in_person_proofing_opt_in_enabled && IdentityConfig.store.in_person_proofing_enabled && idv_session.service_provider&.in_person_proofing_enabled - idv_session.skip_doc_auth == false + idv_session.skip_doc_auth_from_how_to_verify == false || + idv_session.skip_doc_auth == false else - idv_session.skip_doc_auth.nil? || + idv_session.skip_doc_auth_from_how_to_verify.nil? || + idv_session.skip_doc_auth_from_how_to_verify == false || idv_session.skip_doc_auth.nil? || idv_session.skip_doc_auth == false end end diff --git a/app/javascript/packages/document-capture/components/document-capture.tsx b/app/javascript/packages/document-capture/components/document-capture.tsx index 7bdbfa29934..ac1d1f0633d 100644 --- a/app/javascript/packages/document-capture/components/document-capture.tsx +++ b/app/javascript/packages/document-capture/components/document-capture.tsx @@ -40,8 +40,12 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) { const { flowPath } = useContext(UploadContext); const { trackSubmitEvent, trackVisitEvent } = useContext(AnalyticsContext); const { isSelfieCaptureEnabled, docAuthSeparatePagesEnabled } = useContext(SelfieCaptureContext); - const { inPersonFullAddressEntryEnabled, inPersonURL, skipDocAuth, skipDocAuthFromHandoff } = - useContext(InPersonContext); + const { + inPersonFullAddressEntryEnabled, + inPersonURL, + skipDocAuthFromHowToVerify, + skipDocAuthFromHandoff, + } = useContext(InPersonContext); useDidUpdateEffect(onStepChange, [stepName]); useEffect(() => { if (stepName) { @@ -141,9 +145,9 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) { if (submissionError && formValues) { initialValues = formValues; } - // If the user got here by opting-in to in-person proofing, when skipDocAuth === true, + // If the user got here by opting-in to in-person proofing, when skipDocAuthFromHowToVerify === true, // then set steps to inPersonSteps - const isInPersonStepEnabled = skipDocAuth || skipDocAuthFromHandoff; + const isInPersonStepEnabled = skipDocAuthFromHowToVerify || skipDocAuthFromHandoff; const inPersonSteps: FormStep[] = inPersonURL === undefined ? [] @@ -157,7 +161,7 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) { } else if (submissionError) { steps = [reviewFormStep, ...inPersonSteps]; } - // If the user got here by opting-in to in-person proofing, when skipDocAuth === true; + // If the user got here by opting-in to in-person proofing, when skipDocAuthFromHowToVerify === true; // or opting-in ipp from handoff page, and selfie is required, when skipDocAuthFromHandoff === true // then set stepIndicatorPath to VerifyFlowPath.IN_PERSON const stepIndicatorPath = diff --git a/app/javascript/packages/document-capture/components/in-person-prepare-step.tsx b/app/javascript/packages/document-capture/components/in-person-prepare-step.tsx index a8de5bbe374..04a12982665 100644 --- a/app/javascript/packages/document-capture/components/in-person-prepare-step.tsx +++ b/app/javascript/packages/document-capture/components/in-person-prepare-step.tsx @@ -19,7 +19,7 @@ function InPersonPrepareStep({ toPreviousStep }) { inPersonURL, inPersonOutageMessageEnabled, inPersonOutageExpectedUpdateDate, - skipDocAuth, + skipDocAuthFromHowToVerify, skipDocAuthFromHandoff, howToVerifyURL, previousStepURL, @@ -29,7 +29,7 @@ function InPersonPrepareStep({ toPreviousStep }) { if (skipDocAuthFromHandoff && previousStepURL) { // directly from handoff page forceRedirect(previousStepURL); - } else if (skipDocAuth && howToVerifyURL) { + } else if (skipDocAuthFromHowToVerify && howToVerifyURL) { forceRedirect(howToVerifyURL); } else { toPreviousStep(); diff --git a/app/javascript/packages/document-capture/context/in-person.ts b/app/javascript/packages/document-capture/context/in-person.ts index 5de622d6ccb..2104b0d42f4 100644 --- a/app/javascript/packages/document-capture/context/in-person.ts +++ b/app/javascript/packages/document-capture/context/in-person.ts @@ -43,11 +43,11 @@ export interface InPersonContextProps { usStatesTerritories: Array<[string, string]>; /** - * When skipDocAuth is true and in_person_proofing_opt_in_enabled is true, + * When skipDocAuthFromHowToVerify is true and in_person_proofing_opt_in_enabled is true, * users are directed to the beginning of the IPP flow. This is set to true when * they choose Opt-in IPP on the new How To Verify page */ - skipDocAuth?: boolean; + skipDocAuthFromHowToVerify?: boolean; /** * Flag set when user select IPP from handoff page when IPP is available diff --git a/app/javascript/packs/document-capture.tsx b/app/javascript/packs/document-capture.tsx index 4061335eee9..e321427d382 100644 --- a/app/javascript/packs/document-capture.tsx +++ b/app/javascript/packs/document-capture.tsx @@ -34,7 +34,7 @@ interface AppRootData { idvInPersonUrl?: string; optedInToInPersonProofing: string; securityAndPrivacyHowItWorksUrl: string; - skipDocAuth: string; + skipDocAuthFromHowToVerify: string; skipDocAuthFromHandoff: string; howToVerifyURL: string; previousStepUrl: string; @@ -105,7 +105,7 @@ const { inPersonOutageExpectedUpdateDate, optedInToInPersonProofing, usStatesTerritories = '', - skipDocAuth, + skipDocAuthFromHowToVerify, skipDocAuthFromHandoff, howToVerifyUrl, previousStepUrl, @@ -135,7 +135,7 @@ const App = composeComponents( inPersonFullAddressEntryEnabled: inPersonFullAddressEntryEnabled === 'true', optedInToInPersonProofing: optedInToInPersonProofing === 'true', usStatesTerritories: parsedUsStatesTerritories, - skipDocAuth: skipDocAuth === 'true', + skipDocAuthFromHowToVerify: skipDocAuthFromHowToVerify === 'true', skipDocAuthFromHandoff: skipDocAuthFromHandoff === 'true', howToVerifyURL: howToVerifyUrl, previousStepURL: previousStepUrl, diff --git a/app/views/idv/document_capture/show.html.erb b/app/views/idv/document_capture/show.html.erb index e8f61792451..e7fb85d687f 100644 --- a/app/views/idv/document_capture/show.html.erb +++ b/app/views/idv/document_capture/show.html.erb @@ -8,7 +8,6 @@ use_alternate_sdk: use_alternate_sdk, acuant_version: acuant_version, opted_in_to_in_person_proofing: opted_in_to_in_person_proofing, - skip_doc_auth: skip_doc_auth, skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify, skip_doc_auth_from_handoff: skip_doc_auth_from_handoff, doc_auth_selfie_capture: doc_auth_selfie_capture, diff --git a/app/views/idv/hybrid_mobile/document_capture/show.html.erb b/app/views/idv/hybrid_mobile/document_capture/show.html.erb index 0e1818c2825..049858e346b 100644 --- a/app/views/idv/hybrid_mobile/document_capture/show.html.erb +++ b/app/views/idv/hybrid_mobile/document_capture/show.html.erb @@ -8,7 +8,6 @@ use_alternate_sdk: use_alternate_sdk, acuant_version: acuant_version, opted_in_to_in_person_proofing: false, - skip_doc_auth: false, skip_doc_auth_from_how_to_verify: false, skip_doc_auth_from_handoff: nil, doc_auth_selfie_capture: doc_auth_selfie_capture, diff --git a/app/views/idv/shared/_document_capture.html.erb b/app/views/idv/shared/_document_capture.html.erb index aef386fc80d..b672c59a61a 100644 --- a/app/views/idv/shared/_document_capture.html.erb +++ b/app/views/idv/shared/_document_capture.html.erb @@ -37,7 +37,6 @@ us_states_territories: @presenter.usps_states_territories, doc_auth_selfie_capture: doc_auth_selfie_capture, doc_auth_selfie_desktop_test_mode: IdentityConfig.store.doc_auth_selfie_desktop_test_mode, - skip_doc_auth: skip_doc_auth, skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify, skip_doc_auth_from_handoff: skip_doc_auth_from_handoff, how_to_verify_url: idv_how_to_verify_url, diff --git a/spec/controllers/idv/how_to_verify_controller_spec.rb b/spec/controllers/idv/how_to_verify_controller_spec.rb index 79a87fd0123..0fe740e3d6c 100644 --- a/spec/controllers/idv/how_to_verify_controller_spec.rb +++ b/spec/controllers/idv/how_to_verify_controller_spec.rb @@ -219,7 +219,7 @@ it 'sets skip doc auth on idv session to false and redirects to hybrid handoff' do put :update, params: params - expect(subject.idv_session.skip_doc_auth).to be false + expect(subject.idv_session.skip_doc_auth).to be nil expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be false expect(response).to redirect_to(idv_hybrid_handoff_url) end @@ -245,7 +245,7 @@ it 'sets skip doc auth on idv session to true and redirects to document capture' do put :update, params: params - expect(subject.idv_session.skip_doc_auth).to be true + expect(subject.idv_session.skip_doc_auth).to be nil expect(subject.idv_session.skip_doc_auth_from_how_to_verify).to be true expect(response).to redirect_to(idv_document_capture_url) end diff --git a/spec/controllers/idv/hybrid_handoff_controller_spec.rb b/spec/controllers/idv/hybrid_handoff_controller_spec.rb index 65d5c6c9300..d5128ac32f2 100644 --- a/spec/controllers/idv/hybrid_handoff_controller_spec.rb +++ b/spec/controllers/idv/hybrid_handoff_controller_spec.rb @@ -230,7 +230,7 @@ before do allow(IdentityConfig.store).to receive(:doc_auth_selfie_desktop_test_mode). and_return(false) - subject.idv_session.skip_doc_auth = true + subject.idv_session.skip_doc_auth = nil subject.idv_session.skip_doc_auth_from_how_to_verify = true subject.idv_session.skip_hybrid_handoff = true end diff --git a/spec/support/flow_policy_helper.rb b/spec/support/flow_policy_helper.rb index b87810148c3..7297af19a16 100644 --- a/spec/support/flow_policy_helper.rb +++ b/spec/support/flow_policy_helper.rb @@ -14,7 +14,6 @@ def stub_step(key:, idv_session:) when :agreement idv_session.idv_consent_given_at = Time.zone.now.to_s when :how_to_verify - idv_session.skip_doc_auth = false idv_session.skip_doc_auth_from_how_to_verify = false when :hybrid_handoff idv_session.flow_path = 'standard' diff --git a/spec/views/idv/shared/_document_capture.html.erb_spec.rb b/spec/views/idv/shared/_document_capture.html.erb_spec.rb index ceddb2af071..d15ab4aa988 100644 --- a/spec/views/idv/shared/_document_capture.html.erb_spec.rb +++ b/spec/views/idv/shared/_document_capture.html.erb_spec.rb @@ -15,7 +15,6 @@ let(:selfie_capture_enabled) { true } let(:acuant_version) { '1.3.3.7' } - let(:skip_doc_auth) { false } let(:skip_doc_auth_from_how_to_verify) { false } let(:skip_doc_auth_from_handoff) { false } let(:opted_in_to_in_person_proofing) { false } @@ -52,7 +51,6 @@ use_alternate_sdk: use_alternate_sdk, acuant_version: acuant_version, doc_auth_selfie_capture: selfie_capture_enabled, - skip_doc_auth: skip_doc_auth, skip_doc_auth_from_how_to_verify: skip_doc_auth_from_how_to_verify, skip_doc_auth_from_handoff: skip_doc_auth_from_handoff, opted_in_to_in_person_proofing: opted_in_to_in_person_proofing,