diff --git a/app/javascript/packages/document-capture/components/document-capture-not-ready.tsx b/app/javascript/packages/document-capture/components/document-capture-not-ready.tsx index 07c5923ab46..10e52fc0ae8 100644 --- a/app/javascript/packages/document-capture/components/document-capture-not-ready.tsx +++ b/app/javascript/packages/document-capture/components/document-capture-not-ready.tsx @@ -14,13 +14,13 @@ export interface DocumentCaptureNotReadyProps { function DocumentCaptureNotReady({ navigate }: DocumentCaptureNotReadyProps) { const { t } = useI18n(); const { trackEvent } = useContext(AnalyticsContext); - const { currentStep } = useContext(FlowContext); + const { currentStep, accountURL } = useContext(FlowContext); const { name: spName, failureToProofURL } = useContext(ServiceProviderContext); const appName = getConfigValue('appName'); const handleExit = () => { trackEvent('IdV: docauth not ready link clicked'); forceRedirect( - addSearchParams(spName ? failureToProofURL : '/account', { + addSearchParams(spName ? failureToProofURL : accountURL, { step: currentStep, location: 'not_ready', }), diff --git a/app/javascript/packages/verify-flow/cancel.spec.tsx b/app/javascript/packages/verify-flow/cancel.spec.tsx index 2529a0c5359..2e7fa1e8140 100644 --- a/app/javascript/packages/verify-flow/cancel.spec.tsx +++ b/app/javascript/packages/verify-flow/cancel.spec.tsx @@ -14,6 +14,7 @@ describe('Cancel', () => { const { getByText } = render( ({ + accountURL: '', cancelURL: '', exitURL: '', currentStep: '', diff --git a/app/javascript/packs/document-capture.tsx b/app/javascript/packs/document-capture.tsx index b50b0a5c2f6..3ec2b142bce 100644 --- a/app/javascript/packs/document-capture.tsx +++ b/app/javascript/packs/document-capture.tsx @@ -94,6 +94,7 @@ const { flowPath, cancelUrl: cancelURL, exitUrl: exitURL, + accountUrl: accountURL, idvInPersonUrl: inPersonURL, securityAndPrivacyHowItWorksUrl: securityAndPrivacyHowItWorksURL, inPersonFullAddressEntryEnabled, @@ -158,6 +159,7 @@ const App = composeComponents( FlowContext.Provider, { value: { + accountURL, cancelURL, exitURL, currentStep: 'document_capture', diff --git a/app/views/idv/shared/_document_capture.html.erb b/app/views/idv/shared/_document_capture.html.erb index 142f552a8e0..ac8f80e0ea6 100644 --- a/app/views/idv/shared/_document_capture.html.erb +++ b/app/views/idv/shared/_document_capture.html.erb @@ -29,6 +29,7 @@ flow_path: flow_path, cancel_url: idv_cancel_path(step: :document_capture), exit_url: idv_exit_path, + account_url: account_path, failure_to_proof_url: failure_to_proof_url, idv_in_person_url: (IdentityConfig.store.in_person_doc_auth_button_enabled && Idv::InPersonConfig.enabled_for_issuer?(decorated_sp_session.sp_issuer)) ? idv_in_person_url : nil, security_and_privacy_how_it_works_url: MarketingSite.security_and_privacy_how_it_works_url, diff --git a/spec/javascript/packages/document-capture/components/document-capture-not-ready-spec.tsx b/spec/javascript/packages/document-capture/components/document-capture-not-ready-spec.tsx index 2f8dbbcf94f..d5590131249 100644 --- a/spec/javascript/packages/document-capture/components/document-capture-not-ready-spec.tsx +++ b/spec/javascript/packages/document-capture/components/document-capture-not-ready-spec.tsx @@ -39,6 +39,7 @@ describe('DocumentCaptureNotReady', () => { {