Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f7bd410
changelog: User-Facing Improvements, Doc Auth, updating hybrid how to…
AShukla-GSA May 29, 2025
793bbc2
Fixing feature and view specs
AShukla-GSA May 29, 2025
93f6f6c
removing unused key and fixing hybrid handoff spec
AShukla-GSA May 29, 2025
0b003bc
Removing redudant code
AShukla-GSA May 30, 2025
5236085
Resolved Pr comments for UX
AShukla-GSA May 30, 2025
12f073e
Fixing selfie conditional text
AShukla-GSA May 30, 2025
2757cca
Resolving pr comments
AShukla-GSA Jun 2, 2025
ab21fa8
Updating specs
AShukla-GSA Jun 2, 2025
346fadd
Updating to show post office content conditionally and updating specs…
AShukla-GSA Jun 2, 2025
fa2c1bc
Fixing specs
AShukla-GSA Jun 2, 2025
fae3a42
Updating logic in controller and spec
AShukla-GSA Jun 2, 2025
08e1636
Fixing no ipp spec in hybrid handoff
AShukla-GSA Jun 3, 2025
9a67b31
reverting logic
AShukla-GSA Jun 3, 2025
e78bd28
Updating hybrid spec
AShukla-GSA Jun 3, 2025
8562b77
updating precondition for hybrid handoff to support new flow
AShukla-GSA Jun 4, 2025
539c271
Updating specs
AShukla-GSA Jun 4, 2025
b9f3650
Fixing passport spec
AShukla-GSA Jun 4, 2025
107b830
Updating specs again
AShukla-GSA Jun 4, 2025
23eafcf
Updating feature specs
AShukla-GSA Jun 4, 2025
4ad13fc
Updating aria label
AShukla-GSA Jun 4, 2025
eeccb87
Adding id for aria label
AShukla-GSA Jun 4, 2025
5f76fe4
Removing aria label
AShukla-GSA Jun 4, 2025
6ba1856
Fixing mobile routing bug
AShukla-GSA Jun 4, 2025
805213f
Fixing controller specs
AShukla-GSA Jun 4, 2025
437e7dc
moving abandon_any_ipp_progress
AShukla-GSA Jun 5, 2025
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
16 changes: 9 additions & 7 deletions app/controllers/idv/agreement_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ def update
if result.success?
idv_session.idv_consent_given_at = Time.zone.now

if IdentityConfig.store.in_person_proofing_opt_in_enabled &&
IdentityConfig.store.in_person_proofing_enabled
if params[:skip_hybrid_handoff]
redirect_to idv_choose_id_type_url
else
redirect_to idv_how_to_verify_url
end
if in_person_proofing_route_enabled? && params[:skip_hybrid_handoff]
redirect_to idv_choose_id_type_url
else
idv_session.opted_in_to_in_person_proofing = false
idv_session.skip_doc_auth_from_how_to_verify = false
redirect_to idv_hybrid_handoff_url
end
else
Expand Down Expand Up @@ -80,6 +77,11 @@ def analytics_arguments
}.merge(ab_test_analytics_buckets)
end

def in_person_proofing_route_enabled?
IdentityConfig.store.in_person_proofing_opt_in_enabled &&
IdentityConfig.store.in_person_proofing_enabled
end

def skip_to_capture
idv_session.flow_path = 'standard'

Expand Down
3 changes: 2 additions & 1 deletion app/controllers/idv/how_to_verify_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def update
if how_to_verify_form_params['selection'] == Idv::HowToVerifyForm::REMOTE
idv_session.opted_in_to_in_person_proofing = false
idv_session.skip_doc_auth_from_how_to_verify = false
idv_session.flow_path = 'standard'
abandon_any_ipp_progress
redirect_to idv_hybrid_handoff_url
redirect_to idv_document_capture_url
else
idv_session.opted_in_to_in_person_proofing = true
idv_session.flow_path = 'standard'
Expand Down
35 changes: 32 additions & 3 deletions app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ def show
Idv::InPersonConfig.enabled_for_issuer?(
decorated_sp_session.sp_issuer,
)

@post_office_enabled = IdentityConfig.store.in_person_proofing_enabled &&
IdentityConfig.store.in_person_proofing_opt_in_enabled &&
IdentityConfig.store.in_person_doc_auth_button_enabled
@selfie_required = idv_session.selfie_check_required
@idv_how_to_verify_form = Idv::HowToVerifyForm.new
set_how_to_verify_presenter

Funnel::DocAuth::RegisterStep.new(current_user.id, sp_session[:issuer]).call(
'upload', :view,
Expand All @@ -35,8 +39,14 @@ def show

def update
clear_future_steps!
abandon_any_ipp_progress

if params[:type] == 'mobile'
if how_to_verify_form_params['selection'] == Idv::HowToVerifyForm::IPP
idv_session.opted_in_to_in_person_proofing = true
idv_session.flow_path = 'standard'
idv_session.skip_doc_auth_from_how_to_verify = true
redirect_to idv_document_capture_url(step: :hybrid_handoff)
elsif params[:type] == 'mobile'
handle_phone_submission
else
bypass_send_link_steps
Expand All @@ -61,7 +71,7 @@ def self.step_info
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
(self.selected_remote(idv_session: idv_session) || # from opt-in screen
# back from ipp doc capture screen
idv_session.skip_doc_auth_from_handoff)
},
Expand All @@ -74,6 +84,19 @@ def self.step_info

private

def mobile_required?
idv_session.selfie_check_required ||
document_capture_session.doc_auth_vendor == Idp::Constants::Vendors::SOCURE
end

def set_how_to_verify_presenter
@presenter = Idv::HowToVerifyPresenter.new(
mobile_required: mobile_required?,
selfie_check_required: @selfie_required,
passport_allowed: idv_session.passport_allowed,
)
end

def abandon_any_ipp_progress
current_user&.establishing_in_person_enrollment&.cancel
end
Expand Down Expand Up @@ -248,5 +271,11 @@ def formatted_destination_phone
raw_phone = params.require(:doc_auth).permit(:phone)
PhoneFormatter.format(raw_phone, country_code: 'US')
end

def how_to_verify_form_params
params.require(:idv_how_to_verify_form).permit(:selection, selection: [])
rescue ActionController::ParameterMissing
ActionController::Parameters.new(selection: [])
end
end
end
12 changes: 12 additions & 0 deletions app/presenters/idv/how_to_verify_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ def header_text
t('doc_auth.headings.how_to_verify')
end

def hybrid_handoff_text
if selfie_required
t('doc_auth.info.hybrid_handoff_selfie')
else
t('doc_auth.info.hybrid_handoff_no_selfie')
end
end

def online_asset_url
if mobile_required
'idv/mobile-phone-icon.svg'
Expand Down Expand Up @@ -83,6 +91,10 @@ def post_office_instruction
t('doc_auth.info.verify_at_post_office_instruction')
end

def post_office_accepted_id_instruction
t('doc_auth.info.verify_at_post_office_instruction')
end

def post_office_description
if passport_allowed
IdentityConfig.store.in_person_passports_enabled ?
Expand Down
143 changes: 77 additions & 66 deletions app/views/idv/hybrid_handoff/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% self.title = t('titles.doc_auth.hybrid_handoff') %>
<% self.title = @presenter.header_text %>

<% content_for(:pre_flash_content) do %>
<%= render StepIndicatorComponent.new(
Expand All @@ -8,57 +8,12 @@
class: 'margin-x-neg-2 margin-top-neg-4 tablet:margin-x-neg-6 tablet:margin-top-neg-4',
) %>
<% end %>
<%# ============== Non Selfie Section ========== %>
<% if !@selfie_required %>

<%= render PageHeadingComponent.new do %>
<%= t('doc_auth.headings.hybrid_handoff') %>
<% end %>

<p>
<%= t('doc_auth.info.hybrid_handoff') %>
</p>
<%= render PageHeadingComponent.new do %>
<%= t('doc_auth.headings.how_to_verify') %>
<% end %>

<div class="grid-row grid-gap grid-gap-2">
<div class="grid-col-12 tablet:grid-col-auto">
<%= image_tag(
asset_url('idv/phone-icon.svg'),
alt: t('image_description.camera_mobile_phone'),
width: 88,
height: 88,
) %>
</div>
<div class="grid-col-12 tablet:grid-col-fill">
<div class="usa-tag usa-tag--informative">
<%= t('doc_auth.info.tag') %>
</div>
<h2 class="margin-y-105">
<%= t('doc_auth.headings.upload_from_phone') %>
</h2>
<%= t('doc_auth.info.upload_from_phone') %>
<%= simple_form_for(
idv_phone_form,
as: :doc_auth,
url: url_for(type: :mobile, combined: true),
method: 'PUT',
html: {
id: 'form-to-submit-photos-through-mobile',
aria: { label: t('forms.buttons.send_link') },
},
) do |f| %>
<%= render PhoneInputComponent.new(
form: f,
required: true,
delivery_methods: [:sms],
class: 'margin-bottom-4',
) %>
<%= f.submit t('forms.buttons.send_link') %>
<% end %>
</div>
</div>
<%# ============== Selfie Section ========== %>
<% else %>
<div class="grid-row grid-gap grid-gap-2">
<div class="grid-row grid-gap grid-gap-2">
<div class="grid-col-12 tablet:grid-col-auto">
<%= image_tag(
asset_url('idv/phone-icon.svg'),
Expand All @@ -68,10 +23,22 @@
) %>
</div>
<div class="grid-col-12 tablet:grid-col-fill">
<%= render PageHeadingComponent.new do %>
<%= t('doc_auth.headings.hybrid_handoff_selfie') %>
<% end %>
<%= t('doc_auth.info.upload_from_phone') %>
<h2 class="margin-y-105">
<%= t('doc_auth.headings.upload_from_phone') %>
</h2>
<%= @presenter.hybrid_handoff_text %>
<p class="margin-top-2">
<%= new_tab_link_to(
t('doc_auth.info.verify_online_link_text'),
help_center_redirect_path(
category: 'verify-your-identity',
article: 'overview',
flow: :idv,
step: :how_to_verify,
location: 'troubleshooting_options',
),
) %>
</p>
<%= simple_form_for(
idv_phone_form,
as: :doc_auth,
Expand All @@ -90,22 +57,66 @@
) %>
<%= f.submit t('forms.buttons.send_link') %>
<% end %>
<% if @direct_ipp_with_selfie_enabled %>
<div class="margin-top-4 padding-top-2 border-top border-primary-light">
<p class="margin-top-1">
<%= t('doc_auth.info.hybrid_handoff_ipp_html') %>
</p>
<p class="margin-top-1 margin-bottom-0">
<%= link_to t('in_person_proofing.headings.prepare'), idv_document_capture_path(step: :hybrid_handoff) %>
</p>
</div>
<% end %>
</div>
</div>
<% if @post_office_enabled %>
<hr class="margin-top-4" />
<div role="group" class="grid-row">

<div class="grid-col-12 tablet:grid-col-auto">
<%= image_tag(
asset_url(@presenter.post_office_asset_url),
width: 88,
height: 88,
class: 'margin-right-1 margin-top-3',
alt: @presenter.post_office_asset_alt_text,
) %>
</div>

<div class="grid-col-12 tablet:grid-col-fill">
<%= simple_form_for(
@idv_how_to_verify_form,
html: {
id: nil,
class: 'margin-top-3',
aria: { label: @presenter.post_office_submit },
},
method: :put,
url: url_for(type: :mobile, combined: true),
) do |f|
%>
<%= f.hidden_field(
:selection,
value: Idv::HowToVerifyForm::IPP,
) %>
<%= f.label(
:selection_ipp,
) do %>
<h2 class="margin-top-0"><%= @presenter.verify_at_post_office_text %></h2>
<div>
<p><%= @presenter.post_office_instruction %>
<%= @presenter.post_office_description %></p>
<p class="margin-top-2">
<%= new_tab_link_to(
t('doc_auth.info.verify_at_post_office_link_text'),
help_center_redirect_path(
category: 'verify-your-identity',
article: 'verify-your-identity-in-person',
flow: :idv,
step: :how_to_verify,
location: 'troubleshooting_options',
),
) %>
</p>
</div>
<% end %>
<%= f.submit t('forms.buttons.continue_ipp'), class: 'display-block margin-top-3 margin-bottom-2', outline: true %>
<% end %>
</div>
</div>
<% end %>

<% unless @upload_disabled %>
<hr class="margin-y-4" />
<hr class="margin-bottom-4" />
<div class="grid-row grid-gap grid-gap-2">
<div class="grid-col-12 tablet:grid-col-auto">
<%= image_tag(
Expand Down
9 changes: 2 additions & 7 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,6 @@ doc_auth.headings.document_capture_selfie: Photo of your face
doc_auth.headings.document_capture_subheader_selfie: Add a photo of your face
doc_auth.headings.front: Front of your driver’s license or state ID
doc_auth.headings.how_to_verify: Choose how to verify your ID
doc_auth.headings.hybrid_handoff: How would you like to add your ID?
doc_auth.headings.hybrid_handoff_selfie: Enter your phone number to switch devices
doc_auth.headings.interstitial: We are processing your images
doc_auth.headings.lets_go: How verifying your identity works
doc_auth.headings.mailing_address: Enter your mailing address
Expand Down Expand Up @@ -658,8 +656,8 @@ doc_auth.info.exit.with_sp: Exit %{app_name} and return to %{sp_name}
doc_auth.info.exit.without_sp: Exit identity verification and go to your account page
doc_auth.info.getting_started_html: '%{sp_name} needs to make sure you are you — not someone pretending to be you. %{link_html}'
doc_auth.info.getting_started_learn_more: Learn more about verifying your identity
doc_auth.info.hybrid_handoff: We’ll collect information about you by reading your ID.
doc_auth.info.hybrid_handoff_ipp_html: '<strong>Don’t have a mobile phone?</strong> You can verify your identity at a United States Post Office instead.'
doc_auth.info.hybrid_handoff_no_selfie: You’ll take photos of your ID using a phone. You won’t have to sign in again, and you’ll switch back to this computer after you take photos.
doc_auth.info.hybrid_handoff_selfie: You’ll take photos of your ID and yourself using a phone. You won’t have to sign in again, and you’ll switch back to this computer after you take photos.
doc_auth.info.id_types_learn_more: Learn more about which ID types you can use
doc_auth.info.image_loaded: Image loaded
doc_auth.info.image_loading: Image loading
Expand Down Expand Up @@ -695,9 +693,7 @@ doc_auth.info.selfie_capture.action.submit: Photo taken. Submit photo.
doc_auth.info.selfie_capture.intro: Camera is on, ready for selfie
doc_auth.info.ssn: We need your Social Security number to verify your name, date of birth and address.
doc_auth.info.stepping_up_html: Verify your identity again to access this service. %{link_html}
doc_auth.info.tag: Recommended
doc_auth.info.upload_from_computer: Don’t have a phone? Upload photos of your ID from this computer.
doc_auth.info.upload_from_phone: You won’t have to sign in again, and you’ll switch back to this computer after you take photos. Your mobile phone must have a camera and a web browser.
doc_auth.info.verify_at_post_office_description_passport_html: <strong>You can only use a U.S. driver’s license or state ID.</strong> You cannot use a U.S. passport book for this option.
doc_auth.info.verify_at_post_office_instruction: Enter your information online, then verify your identity in person at a participating Post Office.
doc_auth.info.verify_at_post_office_link_text: Learn more about verifying in person
Expand Down Expand Up @@ -1669,7 +1665,6 @@ titles.confirmations.show: Choose a password
titles.create_account: Create an account
titles.doc_auth.address: Update your current residential address
titles.doc_auth.doc_capture: Add your ID
titles.doc_auth.hybrid_handoff: Verify your ID
titles.doc_auth.link_sent: Link sent
titles.doc_auth.processing_images: Processing your images
titles.doc_auth.ssn: Enter your Social Security number
Expand Down
9 changes: 2 additions & 7 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,6 @@ doc_auth.headings.document_capture_selfie: Fotografía de su cara
doc_auth.headings.document_capture_subheader_selfie: Añada una foto de su cara
doc_auth.headings.front: Frente de su licencia de conducir o identificación estatal
doc_auth.headings.how_to_verify: Elija cómo desea verificar su identidad
doc_auth.headings.hybrid_handoff: '¿Cómo desea añadir su identificación?'
doc_auth.headings.hybrid_handoff_selfie: Ingrese su número telefónico para cambiar dispositivos
doc_auth.headings.interstitial: Estamos procesando sus imágenes
doc_auth.headings.lets_go: Cómo funciona la verificación de su identidad
doc_auth.headings.mailing_address: Ingrese su dirección postal
Expand Down Expand Up @@ -669,8 +667,8 @@ doc_auth.info.exit.with_sp: Salir de %{app_name} y volver a %{sp_name}
doc_auth.info.exit.without_sp: Salga de la verificación de identidad y vaya a la página de su cuenta
doc_auth.info.getting_started_html: '%{sp_name} necesita asegurarse de que se trata de usted y no de alguien que se hace pasar por usted. %{link_html}'
doc_auth.info.getting_started_learn_more: Obtenga más información sobre la verificación de su identidad
doc_auth.info.hybrid_handoff: Recopilaremos información sobre usted al leer su identificación.
doc_auth.info.hybrid_handoff_ipp_html: '<strong>¿No tiene un teléfono móvil?</strong> Puede verificar su identidad en una oficina de correos de los Estados Unidos.'
doc_auth.info.hybrid_handoff_no_selfie: Tomará fotografías de su identificación con un teléfono. No tendrá que volver a iniciar sesión y volverá a esta computadora después de tomar las fotos.
doc_auth.info.hybrid_handoff_selfie: Tomará fotografías de su identificación y de usted con un teléfono. No tendrá que volver a iniciar sesión y volverá a esta computadora después de tomar las fotos.
doc_auth.info.id_types_learn_more: Obtenga más información acerca de los tipos de identificación que puede usar
doc_auth.info.image_loaded: Imagen cargada
doc_auth.info.image_loading: Cargando la imagen
Expand Down Expand Up @@ -706,9 +704,7 @@ doc_auth.info.selfie_capture.action.submit: Se tomó la foto. Enviar la foto.
doc_auth.info.selfie_capture.intro: Cámara encendida, lista para tomar selfie
doc_auth.info.ssn: Necesitamos su número de Seguro Social para verificar su nombre, fecha de nacimiento y dirección.
doc_auth.info.stepping_up_html: Verifique de nuevo su identidad para acceder a este servicio. %{link_html}
doc_auth.info.tag: Recomendado
doc_auth.info.upload_from_computer: '¿No tiene un teléfono? Cargue fotos de su identificación desde esta computadora.'
doc_auth.info.upload_from_phone: No tendrá que volver a iniciar sesión y volverá a esta computadora después de tomar las fotos. Su teléfono móvil debe tener una cámara y un navegador web.
doc_auth.info.verify_at_post_office_description_passport_html: <strong>Solo puede usar una licencia de conducir de los EE. UU. o una identificación estatal.</strong> Para esta opción, no puede usar un pasaporte estadounidense.
doc_auth.info.verify_at_post_office_instruction: Ingrese su información en línea, y verifique su identidad en persona en una oficina de correos participante.
doc_auth.info.verify_at_post_office_link_text: Obtenga más información sobre la verificación en persona
Expand Down Expand Up @@ -1681,7 +1677,6 @@ titles.confirmations.show: Elija una contraseña
titles.create_account: Crear una cuenta
titles.doc_auth.address: Actualice su domicilio actual
titles.doc_auth.doc_capture: Agregue su identificación
titles.doc_auth.hybrid_handoff: Verifique su identidad
titles.doc_auth.link_sent: Vínculo enviado
titles.doc_auth.processing_images: Procesando sus imágenes
titles.doc_auth.ssn: Ingrese su número de Seguro Social
Expand Down
Loading