diff --git a/app/controllers/idv/hybrid_handoff_controller.rb b/app/controllers/idv/hybrid_handoff_controller.rb index f5144913502..0702bf9b829 100644 --- a/app/controllers/idv/hybrid_handoff_controller.rb +++ b/app/controllers/idv/hybrid_handoff_controller.rb @@ -47,9 +47,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 6ffda351cab..201aa85d315 100644 --- a/app/javascript/packages/document-capture/components/document-capture.tsx +++ b/app/javascript/packages/document-capture/components/document-capture.tsx @@ -39,8 +39,13 @@ function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) { const { flowPath } = useContext(UploadContext); const { trackSubmitEvent, trackVisitEvent } = useContext(AnalyticsContext); const { isSelfieCaptureEnabled } = useContext(SelfieCaptureContext); - const { inPersonFullAddressEntryEnabled, inPersonURL, skipDocAuth, skipDocAuthFromHandoff } = - useContext(InPersonContext); + const { + inPersonFullAddressEntryEnabled, + inPersonURL, + skipDocAuth, + skipDocAuthFromHandoff, + skipDocAuthFromHowToVerify, + } = useContext(InPersonContext); useDidUpdateEffect(onStepChange, [stepName]); useEffect(() => { if (stepName) { @@ -135,9 +140,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 || skipDocAuth === true, // then set steps to inPersonSteps - const isInPersonStepEnabled = skipDocAuth || skipDocAuthFromHandoff; + const isInPersonStepEnabled = skipDocAuthFromHowToVerify || skipDocAuthFromHandoff || skipDocAuth; const inPersonSteps: FormStep[] = inPersonURL === undefined ? [] @@ -151,7 +156,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 || skipDocAuth === 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..5e5573d137b 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 @@ -20,6 +20,7 @@ function InPersonPrepareStep({ toPreviousStep }) { inPersonOutageMessageEnabled, inPersonOutageExpectedUpdateDate, skipDocAuth, + skipDocAuthFromHowToVerify, skipDocAuthFromHandoff, howToVerifyURL, previousStepURL, @@ -29,7 +30,7 @@ function InPersonPrepareStep({ toPreviousStep }) { if (skipDocAuthFromHandoff && previousStepURL) { // directly from handoff page forceRedirect(previousStepURL); - } else if (skipDocAuth && howToVerifyURL) { + } else if ((skipDocAuthFromHowToVerify || skipDocAuth) && 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..09289efda74 100644 --- a/app/javascript/packages/document-capture/context/in-person.ts +++ b/app/javascript/packages/document-capture/context/in-person.ts @@ -49,6 +49,13 @@ export interface InPersonContextProps { */ skipDocAuth?: boolean; + /** + * 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 + */ + skipDocAuthFromHowToVerify?: boolean; + /** * Flag set when user select IPP from handoff page when IPP is available * and selfie is required diff --git a/app/javascript/packs/document-capture.tsx b/app/javascript/packs/document-capture.tsx index d21223f415b..a0c7a5a22d0 100644 --- a/app/javascript/packs/document-capture.tsx +++ b/app/javascript/packs/document-capture.tsx @@ -34,6 +34,7 @@ interface AppRootData { optedInToInPersonProofing: string; securityAndPrivacyHowItWorksUrl: string; skipDocAuth: string; + skipDocAuthFromHowToVerify: string; skipDocAuthFromHandoff: string; howToVerifyURL: string; previousStepUrl: string; @@ -106,6 +107,7 @@ const { optedInToInPersonProofing, usStatesTerritories = '', skipDocAuth, + skipDocAuthFromHowToVerify, skipDocAuthFromHandoff, howToVerifyUrl, previousStepUrl, @@ -137,6 +139,7 @@ render( optedInToInPersonProofing: optedInToInPersonProofing === 'true', usStatesTerritories: parsedUsStatesTerritories, skipDocAuth: skipDocAuth === 'true', + skipDocAuthFromHowToVerify: skipDocAuthFromHowToVerify === 'true', skipDocAuthFromHandoff: skipDocAuthFromHandoff === 'true', howToVerifyURL: howToVerifyUrl, previousStepURL: previousStepUrl,