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
2 changes: 1 addition & 1 deletion app/assets/fonts/glyphs.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!"#$%&'()+,-./0123456789:;>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ «»¿ÀÁÈÉÊÎÓÚàáâãçèéêëíîïñóôùúû‑—‘’“”…‹中体文简()
!"#$%&'()+,-./0123456789:;>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ «»¿ÀÁÉÊÎÚàáâãçèéêëíîïñóôùúû‑—‘’“”…‹中体文简()
Binary file modified app/assets/fonts/public-sans/PublicSans-Black.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-BlackItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Bold.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-BoldItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraBold.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraBoldItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraLight.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ExtraLightItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Italic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Light.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-LightItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Medium.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-MediumItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Regular.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-SemiBold.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-SemiBoldItalic.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-Thin.woff2
Binary file not shown.
Binary file modified app/assets/fonts/public-sans/PublicSans-ThinItalic.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ def find_device_profiling_result(type)
def user_duplicate_profiles_detected?
return false unless sp_eligible_for_one_account?
profile = current_user&.active_profile
return false unless profile
DuplicateProfileConfirmation.where(
profile_id: profile.id,
confirmed_all: nil,
Expand Down
9 changes: 9 additions & 0 deletions app/controllers/concerns/idv/document_capture_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ def track_document_request_event(document_request:, document_response:, timer:)
analytics.idv_socure_document_request_submitted(**analytics_hash)
end

def choose_id_type_path
idv_choose_id_type_path
end

def doc_auth_upload_enabled?
# false for now until we consolidate this method with desktop_selfie_test_mode_enabled
false
end

private

def track_document_issuing_state(user, state)
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ def self.step_info

private

def doc_auth_upload_enabled?
!(resolved_authn_context_result.facial_match? ||
ab_test_bucket(:DOC_AUTH_MANUAL_UPLOAD_DISABLED) == :manual_upload_disabled)
end

def extra_view_variables
{
id_type:,
Expand All @@ -101,6 +96,7 @@ def extra_view_variables
skip_doc_auth_from_handoff: idv_session.skip_doc_auth_from_handoff,
skip_doc_auth_from_socure: idv_session.skip_doc_auth_from_socure,
opted_in_to_in_person_proofing: idv_session.opted_in_to_in_person_proofing,
choose_id_type_path: choose_id_type_path,
doc_auth_selfie_capture: resolved_authn_context_result.facial_match?,
doc_auth_upload_enabled: doc_auth_upload_enabled?,
socure_errors_timeout_url: idv_socure_document_capture_errors_url(error_code: :timeout),
Expand Down
25 changes: 9 additions & 16 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class HybridHandoffController < ApplicationController

def show
abandon_any_ipp_progress
@upload_disabled = upload_disabled?
@upload_enabled = upload_enabled?

@direct_ipp_with_selfie_enabled = IdentityConfig.store.in_person_doc_auth_button_enabled &&
Idv::InPersonConfig.enabled_for_issuer?(
Expand Down Expand Up @@ -69,12 +69,12 @@ def self.step_info
key: :hybrid_handoff,
controller: self,
next_steps: [:choose_id_type, :link_sent, :document_capture, :socure_document_capture],
preconditions: ->(idv_session:, user:) {
idv_session.idv_consent_given? &&
(self.selected_remote(idv_session: idv_session) || # from opt-in screen
# back from ipp doc capture screen
idv_session.skip_doc_auth_from_handoff)
},
preconditions: ->(idv_session:, user:) do
idv_session.idv_consent_given? &&
(self.selected_remote(idv_session: idv_session) || # from opt-in screen
# back from ipp doc capture screen
idv_session.skip_doc_auth_from_handoff)
end,
undo_step: ->(idv_session:, user:) do
idv_session.flow_path = nil
idv_session.phone_for_mobile_flow = nil
Expand Down Expand Up @@ -147,15 +147,8 @@ def sp_or_app_name
current_sp&.friendly_name.presence || APP_NAME
end

def upload_disabled?
return true if document_capture_session.doc_auth_vendor == Idp::Constants::Vendors::SOCURE

(idv_session.selfie_check_required || doc_auth_upload_disabled?) &&
!idv_session.desktop_selfie_test_mode_enabled?
end

def doc_auth_upload_disabled?
ab_test_bucket(:DOC_AUTH_MANUAL_UPLOAD_DISABLED) == :manual_upload_disabled
def upload_enabled?
idv_session.desktop_selfie_test_mode_enabled?
end

def build_telephony_form_response(telephony_result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def extra_view_variables
document_capture_session_uuid: document_capture_session_uuid,
failure_to_proof_url: return_to_sp_failure_to_proof_url(step: 'document_capture'),
doc_auth_selfie_capture: resolved_authn_context_result.facial_match?,
choose_id_type_path: choose_id_type_path,
doc_auth_upload_enabled: doc_auth_upload_enabled?,
skip_doc_auth_from_socure: @skip_doc_auth_from_socure,
socure_errors_timeout_url: idv_hybrid_mobile_socure_document_capture_errors_url(
Expand All @@ -76,12 +77,6 @@ def extra_view_variables

private

def doc_auth_upload_enabled?
!(resolved_authn_context_result.facial_match? ||
ab_test_bucket(:DOC_AUTH_MANUAL_UPLOAD_DISABLED, user: document_capture_user) ==
:manual_upload_disabled)
end

def analytics_arguments
{
flow_path: 'hybrid',
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/idv/in_person/address_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ def self.step_info
key: :ipp_address,
controller: self,
next_steps: [:ipp_ssn],
preconditions: ->(idv_session:, user:) {
preconditions: ->(idv_session:, user:) do
# Handling passport navigation with checking in_person_passports_allowed? since passport
# form is not setup yet. This should be updated during LG-15985 implmentation.
idv_session.ipp_state_id_complete? || idv_session.in_person_passports_allowed?
},
(idv_session.ipp_state_id_complete? || idv_session.in_person_passports_allowed?) &&
user.has_establishing_in_person_enrollment?
end,
undo_step: ->(idv_session:, user:) do
idv_session.invalidate_in_person_address_step!
end,
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/idv/in_person/ssn_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ def self.step_info
key: :ipp_ssn,
controller: self,
next_steps: [:ipp_verify_info],
preconditions: ->(idv_session:, user:) {
idv_session.ipp_document_capture_complete?
},
preconditions: ->(idv_session:, user:) do
idv_session.ipp_document_capture_complete? &&
user.has_establishing_in_person_enrollment?
end,
undo_step: ->(idv_session:, user:) {
idv_session.invalidate_ssn_step!
},
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/idv/in_person/state_id_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ def self.step_info
key: :ipp_state_id,
controller: self,
next_steps: [:ipp_address, :ipp_ssn],
preconditions: ->(idv_session:, user:) { user.has_establishing_in_person_enrollment? },
preconditions: ->(idv_session:, user:) do
user.has_establishing_in_person_enrollment? &&
!idv_session.opted_in_to_in_person_proofing.nil?
end,
undo_step: ->(idv_session:, user:) do
idv_session.invalidate_in_person_pii_from_user!
end,
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/idv/in_person/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def self.step_info
next_steps: [:phone],
preconditions: ->(idv_session:, user:) do
idv_session.ssn && idv_session.ipp_document_capture_complete? &&
threatmetrix_session_id_present_or_not_required?(idv_session:)
threatmetrix_session_id_present_or_not_required?(idv_session:) &&
user.has_establishing_in_person_enrollment?
end,
undo_step: ->(idv_session:, user:) do
idv_session.residential_resolution_vendor = nil
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/packages/components/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Link({

const handleClick = () => {
// Clear the onbeforeunload event to prevent the "Leave site?" prompt
if (href === 'choose_id_type') {
if (href === '/verify/choose_id_type') {
window.onbeforeunload = null;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function DocumentCaptureTroubleshootingOptions({
showDocumentTips = true,
}: DocumentCaptureTroubleshootingOptionsProps) {
const { t } = useI18n();
const { inPersonURL, passportEnabled } = useContext(InPersonContext);
const { chooseIdTypePath, inPersonURL, passportEnabled } = useContext(InPersonContext);
const { getHelpCenterURL } = useContext(MarketingSiteContext);

return (
Expand All @@ -40,7 +40,7 @@ function DocumentCaptureTroubleshootingOptions({
options={
[
passportEnabled && {
url: 'choose_id_type',
url: chooseIdTypePath,
text: t('idv.troubleshooting.options.use_another_id_type'),
isExternal: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FormStepError } from '@18f/identity-form-steps';
import { Link } from '@18f/identity-components';
import formatHTML from '@18f/identity-react-i18n/format-html';
import MarketingSiteContext from '../context/marketing-site';
import { InPersonContext } from '../context';

interface GeneralErrorProps extends ComponentProps<'p'> {
unknownFieldErrors: FormStepError<{ front: string; back: string }>[];
Expand Down Expand Up @@ -41,6 +42,10 @@ function getError({ unknownFieldErrors }: GetErrorArguments) {
return err;
}

function isNetworkError(unknownFieldErrors) {
return unknownFieldErrors.some((error) => error.field === 'network');
}

function GeneralError({
unknownFieldErrors = [],
isFailedDocType = false,
Expand All @@ -53,6 +58,7 @@ function GeneralError({
}: GeneralErrorProps) {
const { t } = useI18n();
const { getHelpCenterURL } = useContext(MarketingSiteContext);
const { chooseIdTypePath } = useContext(InPersonContext);
const helpCenterLink = getHelpCenterURL({
category: 'verify-your-identity',
article: 'how-to-add-images-of-your-state-issued-id',
Expand All @@ -66,6 +72,7 @@ function GeneralError({
});

const err = getError({ unknownFieldErrors });
const isNetwork = isNetworkError(unknownFieldErrors);

if (isFailedDocType && !!altFailedDocTypeMsg) {
return (
Expand Down Expand Up @@ -94,7 +101,18 @@ function GeneralError({
);
}
if (isPassportError) {
return <p>{t('doc_auth.info.review_passport')}</p>;
if (!isNetwork) {
return <p>{t('doc_auth.info.review_passport')}</p>;
}
return (
<p key={err?.message}>
{t('doc_auth.errors.general.network_error_passport')}{' '}
<Link href={chooseIdTypePath || ''} isExternal={false}>
{t('doc_auth.errors.general.network_error_passport_link_text')}
</Link>{' '}
{t('doc_auth.errors.general.network_error_passport_ending')}
</p>
);
}
if (err && !hasDismissed) {
return <p key={err.message}>{err.message}</p>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ describe('HybridDocCaptureWarning', () => {
t('doc_auth.hybrid_flow_warning.explanation_non_sp_html'),
);
});

it('does not render a third list item pertaining to SP services', () => {
const { getByRole } = render(
<ServiceProviderContextProvider value={{ name: null, failureToProofURL: '' }}>
<HybridDocCaptureWarning />
</ServiceProviderContextProvider>,
);
const alertElement = getByRole('status');
const notExpectedString = t('doc_auth.hybrid_flow_warning.only_add_sp_services_html', {
service_provider_name: SP_NAME,
});

expect(alertElement.textContent).to.not.have.string(notExpectedString);
});
});

describe('with SP', () => {
Expand All @@ -71,19 +57,6 @@ describe('HybridDocCaptureWarning', () => {
service_provider_name: SP_NAME,
});

expect(alertElement.textContent).to.have.string(expectedString);
});
it('renders a third list item pertaining to SP services', () => {
const { getByRole } = render(
<ServiceProviderContextProvider value={{ name: SP_NAME, failureToProofURL: '' }}>
<HybridDocCaptureWarning />
</ServiceProviderContextProvider>,
);
const alertElement = getByRole('status');
const expectedString = t('doc_auth.hybrid_flow_warning.only_add_sp_services_html', {
service_provider_name: SP_NAME,
});

expect(alertElement.textContent).to.have.string(expectedString);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ function HybridDocCaptureWarning({ className = '' }: HybridDocCaptureWarningProp
const serviceProviderName = spContext.name;
const appName = getConfigValue('appName');

const listHeadingText = t('doc_auth.hybrid_flow_warning.only_add_if_text');
const ownAccountItemText = t('doc_auth.hybrid_flow_warning.only_add_own_account', {
app_name: appName,
});
const phoneVerifyItemText = t('doc_auth.hybrid_flow_warning.only_add_phone_verify', {
app_name: appName,
});
let spServicesItemText;
let warningText = t('doc_auth.hybrid_flow_warning.explanation_non_sp_html', {
app_name: appName,
});
Expand All @@ -44,22 +36,11 @@ function HybridDocCaptureWarning({ className = '' }: HybridDocCaptureWarningProp
app_name: appName,
service_provider_name: serviceProviderName,
});
spServicesItemText = t('doc_auth.hybrid_flow_warning.only_add_sp_services_html', {
service_provider_name: serviceProviderName,
});
}

return (
<Alert textTag="div" className={className} type="warning">
<p>{formatWithStrong(warningText)}</p>
<p>
<strong>{listHeadingText}</strong>
</p>
<ul>
<li>{ownAccountItemText}</li>
<li>{formatWithStrong(phoneVerifyItemText)}</li>
{serviceProviderName && <li>{formatWithStrong(spServicesItemText)}</li>}
</ul>
</Alert>
);
}
Expand Down
6 changes: 6 additions & 0 deletions app/javascript/packages/document-capture/context/in-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ export interface InPersonContextProps {
*/
skipDocAuthFromSocure?: boolean;

/**
* path to choose ID type page, used when passports is enabled
*/

chooseIdTypePath?: string;

/**
* URL for Opt-in IPP, used when in_person_proofing_opt_in_enabled is enabled
*/
Expand Down
3 changes: 3 additions & 0 deletions app/javascript/packs/document-capture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ interface AppRootData {
howToVerifyURL: string;
socureErrorsTimeoutURL: string;
previousStepUrl: string;
chooseIdTypePath: string;
docAuthPassportsEnabled: string;
docAuthSelfieDesktopTestMode: string;
docAuthUploadEnabled: string;
Expand Down Expand Up @@ -123,6 +124,7 @@ const {
howToVerifyUrl,
socureErrorsTimeoutUrl,
previousStepUrl,
chooseIdTypePath,
docAuthPassportsEnabled,
docAuthSelfieDesktopTestMode,
locationsUrl: locationsURL,
Expand Down Expand Up @@ -152,6 +154,7 @@ render(
skipDocAuthFromHandoff: skipDocAuthFromHandoff === 'true',
skipDocAuthFromSocure: skipDocAuthFromSocure === 'true',
howToVerifyURL: howToVerifyUrl,
chooseIdTypePath,
socureErrorsTimeoutURL: socureErrorsTimeoutUrl,
passportEnabled: String(docAuthPassportsEnabled) === 'true',
previousStepURL: previousStepUrl,
Expand Down
Loading