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
10 changes: 7 additions & 3 deletions app/assets/stylesheets/email.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@
line-height: 60px;
}

h4 {
font-weight: bold;
margin-bottom: 16px;
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.4;
}

.button.large.expanded table a {
Expand Down
16 changes: 8 additions & 8 deletions app/assets/stylesheets/variables/_email.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ $global-line-height: 1.5;
$global-font-size: 16px;
$body-line-height: $global-line-height;
$header-font-family: $body-font-family;
$header-font-weight: $global-font-weight;
$h1-font-size: 34px;
$h2-font-size: 30px;
$h3-font-size: 28px;
$h4-font-size: 24px;
$h5-font-size: 20px;
$h6-font-size: 18px;
$header-margin-bottom: 10px;
$header-font-weight: 700;
$h1-font-size: 28px;
$h2-font-size: 22px;
$h3-font-size: 18px;
$h4-font-size: 16px;
$h5-font-size: 14px;
$h6-font-size: 12px;
$header-margin-bottom: 16px;
$paragraph-margin-bottom: 10px;
$small-font-size: 80%;
$small-font-color: $medium-gray;
Expand Down
11 changes: 5 additions & 6 deletions app/controllers/concerns/idv/verify_info_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def shared_update
idv_session.vendor_phone_confirmation = false
idv_session.user_phone_confirmation = false

pii[:ssn] = idv_session.ssn # Required for proof_resolution job
Idv::Agent.new(pii).proof_resolution(
document_capture_session,
should_proof_state_id: should_use_aamva?(pii),
Expand Down Expand Up @@ -69,9 +70,8 @@ def resolution_rate_limiter
end

def ssn_rate_limiter
ssn = idv_session.ssn || pii[:ssn]
@ssn_rate_limiter ||= RateLimiter.new(
target: Pii::Fingerprinter.fingerprint(ssn),
target: Pii::Fingerprinter.fingerprint(idv_session.ssn),
rate_limit_type: :proof_ssn,
)
end
Expand Down Expand Up @@ -301,19 +301,18 @@ def log_idv_verification_submitted_event(success: false, failure_reason: nil)
last_name: pii_from_doc[:last_name],
date_of_birth: pii_from_doc[:dob],
address: pii_from_doc[:address1],
ssn: idv_session.ssn || pii_from_doc[:ssn],
ssn: idv_session.ssn,
failure_reason: failure_reason,
)
end

def check_ssn
ssn = idv_session.ssn || pii[:ssn]
Idv::SsnForm.new(current_user).submit(ssn: ssn)
Idv::SsnForm.new(current_user).submit(ssn: idv_session.ssn)
end

def move_applicant_to_idv_session
idv_session.applicant = pii
idv_session.applicant[:ssn] ||= idv_session.ssn
idv_session.applicant[:ssn] = idv_session.ssn
idv_session.applicant['uuid'] = current_user.uuid
delete_pii
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/idv_step_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def flow_path
private

def confirm_ssn_step_complete
return if pii.present? && (idv_session.ssn.present? || pii[:ssn].present?)
return if pii.present? && idv_session.ssn.present?
redirect_to prev_url
end

Expand Down
6 changes: 2 additions & 4 deletions app/controllers/concerns/rate_limit_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ def idv_attempter_rate_limited?(rate_limit_type)
end

def pii_ssn
return unless defined?(flow_session) && defined?(idv_session) && user_session
pii_from_doc_ssn = idv_session&.ssn || flow_session[:pii_from_doc]&.[](:ssn)
return pii_from_doc_ssn if pii_from_doc_ssn
flow_session[:pii_from_user]&.[](:ssn)
return unless defined?(idv_session) && user_session
idv_session&.ssn
end
end
11 changes: 4 additions & 7 deletions app/controllers/idv/in_person/ssn_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class SsnController < ApplicationController
attr_accessor :error_message

def show
incoming_ssn = idv_session.ssn || flow_session.dig(:pii_from_user, :ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, incoming_ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, idv_session.ssn)

analytics.idv_doc_auth_redo_ssn_submitted(**analytics_arguments) if updating_ssn?
analytics.idv_doc_auth_ssn_visited(**analytics_arguments)
Expand All @@ -28,8 +27,7 @@ def show

def update
@error_message = nil
incoming_ssn = idv_session.ssn || flow_session.dig(:pii_from_user, :ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, incoming_ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, idv_session.ssn)
ssn = params.require(:doc_auth).permit(:ssn)
form_response = @ssn_form.submit(ssn)

Expand All @@ -42,7 +40,6 @@ def update
)

if form_response.success?
flow_session[:pii_from_user][:ssn] = params[:doc_auth][:ssn]
idv_session.ssn = params[:doc_auth][:ssn]
idv_session.invalidate_steps_after_ssn!
redirect_to idv_in_person_verify_info_url
Expand Down Expand Up @@ -70,7 +67,7 @@ def flow_path
end

def confirm_repeat_ssn
return if !idv_session.ssn && !pii_from_user[:ssn]
return if !idv_session.ssn
return if request.referer == idv_in_person_verify_info_url
redirect_to idv_in_person_verify_info_url
end
Expand All @@ -86,7 +83,7 @@ def analytics_arguments
end

def updating_ssn?
idv_session.ssn.present? || flow_session.dig(:pii_from_user, :ssn).present?
idv_session.ssn.present?
end

def confirm_in_person_address_step_complete
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/in_person/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class VerifyInfoController < ApplicationController

def show
@step_indicator_steps = step_indicator_steps
@ssn = idv_session.ssn || flow_session[:pii_from_user][:ssn]
@ssn = idv_session.ssn
@capture_secondary_id_enabled = capture_secondary_id_enabled

analytics.idv_doc_auth_verify_visited(**analytics_arguments)
Expand Down
8 changes: 2 additions & 6 deletions app/controllers/idv/session_errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def failure
def ssn_failure
rate_limiter = nil

if ssn_from_doc
if idv_session&.ssn
rate_limiter = RateLimiter.new(
target: Pii::Fingerprinter.fingerprint(ssn_from_doc),
target: Pii::Fingerprinter.fingerprint(idv_session.ssn),
rate_limit_type: :proof_ssn,
)
@expires_at = rate_limiter.expires_at
Expand All @@ -59,10 +59,6 @@ def rate_limited

private

def ssn_from_doc
idv_session&.ssn || user_session&.dig('idv/doc_auth', :pii_from_doc, :ssn)
end

def confirm_two_factor_authenticated_or_user_id_in_session
return if session[:doc_capture_user_id].present?

Expand Down
9 changes: 3 additions & 6 deletions app/controllers/idv/ssn_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ class SsnController < ApplicationController
attr_accessor :error_message

def show
incoming_ssn = idv_session.ssn || flow_session.dig(:pii_from_doc, :ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, incoming_ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, idv_session.ssn)

analytics.idv_doc_auth_redo_ssn_submitted(**analytics_arguments) if @ssn_form.updating_ssn?
analytics.idv_doc_auth_ssn_visited(**analytics_arguments)
Expand All @@ -28,8 +27,7 @@ def show
def update
@error_message = nil

incoming_ssn = idv_session.ssn || flow_session.dig(:pii_from_doc, :ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, incoming_ssn)
@ssn_form = Idv::SsnFormatForm.new(current_user, idv_session.ssn)
form_response = @ssn_form.submit(params.require(:doc_auth).permit(:ssn))

analytics.idv_doc_auth_ssn_submitted(
Expand All @@ -40,7 +38,6 @@ def update
)

if form_response.success?
flow_session[:pii_from_doc][:ssn] = params[:doc_auth][:ssn]
idv_session.ssn = params[:doc_auth][:ssn]
idv_session.invalidate_steps_after_ssn!
redirect_to next_url
Expand All @@ -53,7 +50,7 @@ def update
private

def confirm_repeat_ssn
return if !idv_session.ssn && !pii_from_doc[:ssn]
return if !idv_session.ssn
return if request.referer == idv_verify_info_url

redirect_to idv_verify_info_url
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class VerifyInfoController < ApplicationController

def show
@step_indicator_steps = step_indicator_steps
@ssn = idv_session.ssn || pii_from_doc[:ssn]
@ssn = idv_session.ssn

analytics.idv_doc_auth_verify_visited(**analytics_arguments)
Funnel::DocAuth::RegisterStep.new(current_user.id, sp_session[:issuer]).
Expand Down
78 changes: 0 additions & 78 deletions app/controllers/users/phones_controller.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/controllers/users/two_factor_authentication_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ def handle_telephony_result(method:, default:, otp_delivery_selection_result:)
otp_make_default_number: default,
)
elsif @telephony_result.error.is_a?(Telephony::OptOutError)
# clear message from https://github.com/18F/identity-idp/blob/7ad3feab24f6f9e0e45224d9e9be9458c0a6a648/app/controllers/users/phones_controller.rb#L40
flash.delete(:info)
opt_out = PhoneNumberOptOut.mark_opted_out(phone_to_deliver_to)
redirect_to login_two_factor_sms_opt_in_path(opt_out_uuid: opt_out)
else
Expand Down
6 changes: 5 additions & 1 deletion app/forms/idv/state_id_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def self.model_name
ActiveModel::Name.new(self, nil, 'StateId')
end

def initialize(pii)
def initialize(pii, capture_secondary_id_enabled:)
@pii = pii
@capture_secondary_id_enabled = capture_secondary_id_enabled
end

def submit(params)
Expand All @@ -35,6 +36,9 @@ def submit(params)

private

attr_reader :capture_secondary_id_enabled
alias_method :capture_secondary_id_enabled?, :capture_secondary_id_enabled

def consume_params(params)
params.each do |key, value|
raise_invalid_state_id_parameter_error(key) unless ATTRIBUTES.include?(key.to_sym)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useI18n } from '@18f/identity-react-i18n';
import UnknownError from './unknown-error';
import TipList from './tip-list';
import DocumentSideAcuantCapture from './document-side-acuant-capture';
import DocumentCaptureTroubleshootingOptions from './document-capture-troubleshooting-options';

interface DocumentCaptureReviewIssuesProps {
isFailedDocType: boolean;
Expand All @@ -22,6 +21,7 @@ interface DocumentCaptureReviewIssuesProps {
errors: FormStepError<any>[];
onChange: (...args: any) => void;
onError: OnErrorCallback;
hasDismissed: boolean;
}

type DocumentSide = 'front' | 'back';
Expand All @@ -40,6 +40,7 @@ function DocumentCaptureReviewIssues({
onChange = () => undefined,
onError = () => undefined,
value = {},
hasDismissed,
}: DocumentCaptureReviewIssuesProps) {
const { t } = useI18n();
return (
Expand All @@ -50,9 +51,11 @@ function DocumentCaptureReviewIssues({
remainingAttempts={remainingAttempts}
isFailedDocType={isFailedDocType}
altFailedDocTypeMsg={isFailedDocType ? t('doc_auth.errors.doc.wrong_id_type') : null}
hasDismissed={hasDismissed}
/>
{!isFailedDocType && captureHints && (
<TipList
titleClassName="margin-bottom-0 margin-top-2"
title={t('doc_auth.tips.review_issues_id_header_text')}
items={[
t('doc_auth.tips.review_issues_id_text1'),
Expand All @@ -75,8 +78,6 @@ function DocumentCaptureReviewIssues({
/>
))}
<FormStepsButton.Submit />

<DocumentCaptureTroubleshootingOptions location="post_submission_review" />
<Cancel />
</>
);
Expand Down
Loading