Skip to content
Merged
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
5 changes: 1 addition & 4 deletions app/controllers/concerns/idv/ab_test_analytics_concern.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
module Idv
module AbTestAnalyticsConcern
include AcuantConcern
include Idv::PhoneQuestionAbTestConcern

def ab_test_analytics_buckets
buckets = {}
if defined?(idv_session)
buckets[:skip_hybrid_handoff] = idv_session&.skip_hybrid_handoff
buckets[:phone_with_camera] = idv_session&.phone_with_camera
end

buckets.merge(acuant_sdk_ab_test_analytics_args).
merge(phone_question_ab_test_analytics_bucket)
buckets.merge(acuant_sdk_ab_test_analytics_args)
end
end
end
31 changes: 0 additions & 31 deletions app/controllers/concerns/idv/phone_question_ab_test_concern.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/controllers/idv/agreement_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.step_info
Idv::StepInfo.new(
key: :agreement,
controller: self,
next_steps: [:hybrid_handoff, :document_capture, :phone_question, :how_to_verify],
next_steps: [:hybrid_handoff, :document_capture, :how_to_verify],
preconditions: ->(idv_session:, user:) { idv_session.welcome_visited },
undo_step: ->(idv_session:, user:) do
idv_session.idv_consent_given = nil
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class DocumentCaptureController < ApplicationController
include DocumentCaptureConcern
include IdvStepConcern
include StepIndicatorConcern
include PhoneQuestionAbTestConcern

before_action :confirm_not_rate_limited, except: [:update]
before_action :confirm_step_allowed
Expand Down Expand Up @@ -47,11 +46,9 @@ 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'),
phone_with_camera: idv_session.phone_with_camera,
skip_doc_auth: idv_session.skip_doc_auth,
}.merge(
acuant_sdk_upgrade_a_b_testing_variables,
phone_question_ab_test_analytics_bucket,
)
end

Expand Down
3 changes: 0 additions & 3 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ class HybridHandoffController < ApplicationController
include ActionView::Helpers::DateHelper
include IdvStepConcern
include StepIndicatorConcern
include PhoneQuestionAbTestConcern

before_action :confirm_not_rate_limited
before_action :confirm_step_allowed
before_action :confirm_hybrid_handoff_needed, only: :show
before_action :maybe_redirect_for_phone_question_ab_test, only: :show

def show
analytics.idv_doc_auth_hybrid_handoff_visited(**analytics_arguments)
Expand All @@ -19,7 +17,6 @@ def show
true
)

@phone_question_ab_test_bucket = phone_question_ab_test_bucket
render :show, locals: extra_view_variables
end

Expand Down
10 changes: 2 additions & 8 deletions app/controllers/idv/hybrid_mobile/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class DocumentCaptureController < ApplicationController
include Idv::AvailabilityConcern
include DocumentCaptureConcern
include HybridMobileConcern
include PhoneQuestionAbTestConcern

before_action :check_valid_document_capture_session
before_action :override_csp_to_allow_acuant
Expand Down Expand Up @@ -44,8 +43,7 @@ def extra_view_variables
failure_to_proof_url: return_to_sp_failure_to_proof_url(step: 'document_capture'),
}.merge(
acuant_sdk_upgrade_a_b_testing_variables,
phone_question_ab_test_analytics_bucket,
).merge(phone_with_camera)
)
end

private
Expand All @@ -58,7 +56,7 @@ def analytics_arguments
irs_reproofing: irs_reproofing?,
}.merge(
ab_test_analytics_buckets,
).merge(phone_with_camera)
)
end

def handle_stored_result
Expand All @@ -85,10 +83,6 @@ def redo_document_capture_pending?

document_capture_session.requested_at > stored_result.captured_at
end

def phone_with_camera
{ phone_with_camera: phone_question_ab_test_bucket == :show_phone_question ? true : nil }
end
end
end
end
6 changes: 1 addition & 5 deletions app/controllers/idv/link_sent_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class LinkSentController < ApplicationController
include DocumentCaptureConcern
include IdvStepConcern
include StepIndicatorConcern
include PhoneQuestionAbTestConcern

before_action :confirm_not_rate_limited
before_action :confirm_step_allowed
Expand Down Expand Up @@ -34,10 +33,7 @@ def update
end

def extra_view_variables
{ phone: idv_session.phone_for_mobile_flow }.merge(
phone_question_ab_test_analytics_bucket,
phone_with_camera: idv_session.phone_with_camera,
)
{ phone: idv_session.phone_for_mobile_flow }
end

def self.step_info
Expand Down
59 changes: 0 additions & 59 deletions app/controllers/idv/phone_question_controller.rb

This file was deleted.

25 changes: 2 additions & 23 deletions app/forms/idv/api_image_upload_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,10 @@ def extra_attributes
user_id: user_uuid,
pii_like_keypaths: DocPiiForm.pii_like_keypaths,
flow_path: params[:flow_path],
phone_with_camera: phone_with_camera,
}

@extra_attributes[:front_image_fingerprint] = front_image_fingerprint
@extra_attributes[:back_image_fingerprint] = back_image_fingerprint
@extra_attributes.merge!(phone_question_ab_test_analytics_bucket)
@extra_attributes
end

Expand Down Expand Up @@ -284,8 +282,7 @@ def doc_auth_client
vendor_discriminator: document_capture_session_uuid,
warn_notifier: proc do |attrs|
analytics&.doc_auth_warning(
**attrs.
merge(phone_question_ab_test_analytics_bucket),
**attrs,
)
end,
)
Expand Down Expand Up @@ -318,11 +315,9 @@ def update_analytics(client_response:, vendor_request_time_in_ms:)
client_image_metrics: image_metadata,
async: false,
flow_path: params[:flow_path],
phone_with_camera: phone_with_camera,
vendor_request_time_in_ms: vendor_request_time_in_ms,
).except(:classification_info).
merge(acuant_sdk_upgrade_ab_test_data).
merge(phone_question_ab_test_analytics_bucket),
merge(acuant_sdk_upgrade_ab_test_data),
)
end

Expand Down Expand Up @@ -353,13 +348,6 @@ def acuant_sdk_upgrade_ab_test_data
}
end

def phone_question_ab_test_analytics_bucket
{
phone_question_ab_test_bucket:
AbTests::IDV_PHONE_QUESTION.bucket(user_uuid),
}
end

def acuant_sdk_capture?
image_metadata.dig(:front, :source) == Idp::Constants::Vendors::ACUANT &&
image_metadata.dig(:back, :source) == Idp::Constants::Vendors::ACUANT
Expand Down Expand Up @@ -484,14 +472,5 @@ def store_failed_images(client_response, doc_pii_response)
def image_resubmission_check?
IdentityConfig.store.doc_auth_check_failed_image_resubmission_enabled
end

def phone_with_camera
case params[:phone_with_camera]
when 'true'
true
when 'false'
false
end
end
end
end
1 change: 0 additions & 1 deletion app/policies/idv/flow_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def steps
welcome: Idv::WelcomeController.step_info,
agreement: Idv::AgreementController.step_info,
how_to_verify: Idv::HowToVerifyController.step_info,
phone_question: Idv::PhoneQuestionController.step_info,
hybrid_handoff: Idv::HybridHandoffController.step_info,
link_sent: Idv::LinkSentController.step_info,
document_capture: Idv::DocumentCaptureController.step_info,
Expand Down
29 changes: 2 additions & 27 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,12 @@ def contact_redirect(redirect_url:, step: nil, location: nil, flow: nil, **extra
end

# @param [String] message the warning
# @param [String] phone_question_ab_test_bucket Prompt user with phone question before doc auth
# Logged when there is a non-user-facing error in the doc auth process, such as an unrecognized
# field from a vendor
def doc_auth_warning(message: nil,
phone_question_ab_test_bucket: nil, **extra)
def doc_auth_warning(message: nil, **extra)
track_event(
'Doc Auth Warning',
message: message,
phone_question_ab_test_bucket: phone_question_ab_test_bucket,
**extra,
)
end
Expand Down Expand Up @@ -904,17 +901,6 @@ def idv_doc_auth_link_sent_visited(**extra)
track_event('IdV: doc auth link_sent visited', **extra)
end

# The "phone question" step: Desktop user has submitted they
# do or do not have a phone with a a camera via desktop
def idv_doc_auth_phone_question_submitted(**extra)
track_event(:idv_doc_auth_phone_question_submitted, **extra)
end

# Desktop user has reached the above "phone question" view
def idv_doc_auth_phone_question_visited(**extra)
track_event(:idv_doc_auth_phone_question_visited, **extra)
end

def idv_doc_auth_randomizer_defaulted
track_event(
'IdV: doc_auth random vendor error',
Expand Down Expand Up @@ -949,8 +935,6 @@ def idv_doc_auth_ssn_visited(**extra)
# @param [String] flow_path
# @param [String] front_image_fingerprint Fingerprint of front image data
# @param [String] back_image_fingerprint Fingerprint of back image data
# @param [String] phone_question_ab_test_bucket Prompt user with phone question before doc auth
# @param [String] phone_with_camera the result of the phone question a/b test
# The document capture image uploaded was locally validated during the IDV process
def idv_doc_auth_submitted_image_upload_form(
success:,
Expand All @@ -961,8 +945,6 @@ def idv_doc_auth_submitted_image_upload_form(
user_id: nil,
front_image_fingerprint: nil,
back_image_fingerprint: nil,
phone_question_ab_test_bucket: nil,
phone_with_camera: nil,
**extra
)
track_event(
Expand All @@ -975,8 +957,6 @@ def idv_doc_auth_submitted_image_upload_form(
flow_path: flow_path,
front_image_fingerprint: front_image_fingerprint,
back_image_fingerprint: back_image_fingerprint,
phone_question_ab_test_bucket: phone_question_ab_test_bucket,
phone_with_camera: phone_with_camera,
**extra,
)
end
Expand All @@ -996,8 +976,6 @@ def idv_doc_auth_submitted_image_upload_form(
# @param [Float] vendor_request_time_in_ms Time it took to upload images & get a response.
# @param [String] front_image_fingerprint Fingerprint of front image data
# @param [String] back_image_fingerprint Fingerprint of back image data
# @param [String] phone_question_ab_test_bucket Prompt user with phone question before doc auth
# @param [String] phone_with_camera the result of the phone question a/b test
# The document capture image was uploaded to vendor during the IDV process
def idv_doc_auth_submitted_image_upload_vendor(
success:,
Expand All @@ -1014,8 +992,6 @@ def idv_doc_auth_submitted_image_upload_vendor(
vendor_request_time_in_ms: nil,
front_image_fingerprint: nil,
back_image_fingerprint: nil,
phone_question_ab_test_bucket: nil,
phone_with_camera: nil,
**extra
)
track_event(
Expand All @@ -1035,8 +1011,6 @@ def idv_doc_auth_submitted_image_upload_vendor(
vendor_request_time_in_ms: vendor_request_time_in_ms,
front_image_fingerprint: front_image_fingerprint,
back_image_fingerprint: back_image_fingerprint,
phone_question_ab_test_bucket: phone_question_ab_test_bucket,
phone_with_camera: phone_with_camera,
**extra,
)
end
Expand Down Expand Up @@ -2346,6 +2320,7 @@ def idv_link_sent_capture_doc_polling_complete(
isRateLimited: isRateLimited,
)
end

# rubocop:enable Naming/VariableName,Naming/MethodParameterName

def idv_link_sent_capture_doc_polling_started(**_extra)
Expand Down
1 change: 0 additions & 1 deletion app/services/idv/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class Session
personal_key
personal_key_acknowledged
phone_for_mobile_flow
phone_with_camera
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.

This session attribute removal should be okay to deploy at the same time as deleting the controller that uses it, because the feature flag has been turned off for a while.

pii_from_doc
previous_phone_step_params
profile_id
Expand Down
Loading