Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@KeithNava
(I’m starting this general conversation on a specific file so that replies are threaded.)

When I look at the “Progress” section of the ticket LG-13006, I see checkbox 4

  • remove decision points with the old value skip_doc_auth and replace with skip_doc_auth_from_how_to_verify. PR created (23 May), wait for next deploy to merge.

After the “wait for deploy” line, I see checkbox 5

  • remove skip_doc_auth from everywhere, except session.rb.

Based on the "Summary of changes" in the PR description, I think this PR is meant to take care of checkbox 5, correct? I don’t see that Micah N’s PR #10690, which I believe took care of checkbox 4, was ever merged. Are you planning on merging that PR before this one? Does it need a review?

Let me know, thanks! I haven’t yet had a chance to review this PR, but I wanted to ask this question upfront because I know sequencing gets tricky for PRs that are affected by 50-50 state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@eileen-nava Thanks. I actually noticed that the logic in PR #10690 was updated via this commit da81567#diff-ffdec6293037a40f4daee9914c58a356de09f502e897c0e73ea4f02c76787c02 so I don't think we would need Micah's PR anymore. I'm tagging @n1zyy to help confirm though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@KeithNava I have to plead some level of ignorance here. 😇

I wasn't intentionally changing anything relating to skip_doc_auth in that PR; I just removed it as appearing to be unused. This comment paints some context for the change—we were passing that value into the constructor but didn't seem to ever be using its value in the show method, so I removed it as dead code. (TBH I don't completely remember why I thought it was unused, but it seems like people agreed with me. I've lost some of this context to time.)

I didn't have Micah's PR in mind when I worked on this. It looks like his change to this file would be unnecessary, but he did also update the HybridHandoffController which I didn't touch, so that likely still needs attention.

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,
Expand All @@ -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?
Expand Down
4 changes: 1 addition & 3 deletions app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
},
)
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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? ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just confirming my understanding: the idea here is backwards compatibility with people who might already have skip_doc_auth on their session?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep that's exactly it! The follow up ticket would remove skip_doc_auth entirely.

idv_session.skip_doc_auth == false
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
? []
Expand All @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function InPersonPrepareStep({ toPreviousStep }) {
inPersonURL,
inPersonOutageMessageEnabled,
inPersonOutageExpectedUpdateDate,
skipDocAuth,
skipDocAuthFromHowToVerify,
skipDocAuthFromHandoff,
howToVerifyURL,
previousStepURL,
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/packages/document-capture/context/in-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/packs/document-capture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface AppRootData {
idvInPersonUrl?: string;
optedInToInPersonProofing: string;
securityAndPrivacyHowItWorksUrl: string;
skipDocAuth: string;
skipDocAuthFromHowToVerify: string;
skipDocAuthFromHandoff: string;
howToVerifyURL: string;
previousStepUrl: string;
Expand Down Expand Up @@ -105,7 +105,7 @@ const {
inPersonOutageExpectedUpdateDate,
optedInToInPersonProofing,
usStatesTerritories = '',
skipDocAuth,
skipDocAuthFromHowToVerify,
skipDocAuthFromHandoff,
howToVerifyUrl,
previousStepUrl,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion app/views/idv/document_capture/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion app/views/idv/hybrid_mobile/document_capture/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion app/views/idv/shared/_document_capture.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/idv/how_to_verify_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/idv/hybrid_handoff_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion spec/support/flow_policy_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 0 additions & 2 deletions spec/views/idv/shared/_document_capture.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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,
Expand Down