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
Binary file removed app/assets/images/state-id-confirm@3x.png
Binary file not shown.
8 changes: 0 additions & 8 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,6 @@ def please_reset_password
end
end

def doc_auth_desktop_link_to_sp(application, link)
with_user_locale(user) do
@link = link
@application = application
mail(to: email_address.email, subject: t('user_mailer.doc_auth_link.subject'))
end
end

def letter_reminder
return unless email_should_receive_nonessential_notifications?(email_address.email)

Expand Down
7 changes: 7 additions & 0 deletions app/models/doc_auth_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@ class DocAuthLog < ApplicationRecord
foreign_key: 'issuer',
primary_key: 'issuer'
# rubocop:enable Rails/InverseOf

self.ignored_columns = [
:email_sent_view_at,
:email_sent_view_count,
:send_link_view_at,
:send_link_view_count,
]
end
4 changes: 0 additions & 4 deletions app/services/analytics_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,6 @@ def idv_doc_auth_document_capture_submitted(**extra)
track_event('IdV: doc auth document_capture submitted', **extra)
end

def idv_doc_auth_email_sent_visited(**extra)
track_event('IdV: doc auth email_sent visited', **extra)
end

# @param [String] step_name which step the user was on
# @param [Integer] remaining_attempts how many attempts the user has left before we throttle them
# The user visited an error page due to an encountering an exception talking to a proofing vendor
Expand Down
2 changes: 0 additions & 2 deletions app/services/funnel/doc_auth/register_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class RegisterStep
agreement
welcome
upload
send_link
link_sent
email_sent
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.

Should we also remove email_sent_view_at and emaiil_sent_view_count columns from the corresponding doc_auth_logs database table?

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.

we can't drop the columns in the same PR, but we could mark them as ignored in this one

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.

I have my eye on cleaning up the doc_auth_logs table in LG-9334.

Meanwhile, marked the email_sent columns as ignored and did the same for the send_link columns which are also awaiting deletion. Thanks for the pointer!

front_image
back_image
mobile_front_image
Expand Down
1 change: 0 additions & 1 deletion app/services/idv/actions/redo_document_capture_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def self.analytics_submitted_event
def call
mark_step_incomplete(:document_capture)
unless flow_session[:skip_upload_step]
mark_step_incomplete(:email_sent)
mark_step_incomplete(:link_sent)
mark_step_incomplete(:upload)
end
Expand Down
1 change: 0 additions & 1 deletion app/services/idv/flows/doc_auth_flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class DocAuthFlow < Flow::BaseFlow
agreement: Idv::Steps::AgreementStep,
upload: Idv::Steps::UploadStep,
link_sent: Idv::Steps::LinkSentStep,
email_sent: Idv::Steps::EmailSentStep,
document_capture: Idv::Steps::DocumentCaptureStep,
}.freeze

Expand Down
13 changes: 0 additions & 13 deletions app/services/idv/steps/email_sent_step.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/services/idv/steps/link_sent_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Steps
class LinkSentStep < DocAuthBaseStep
STEP_INDICATOR_STEP = :verify_id

HYBRID_FLOW_STEPS = %i[upload link_sent email_sent document_capture]
HYBRID_FLOW_STEPS = %i[upload link_sent document_capture]

def self.analytics_visited_event
:idv_doc_auth_link_sent_visited
Expand Down
30 changes: 7 additions & 23 deletions app/services/idv/steps/upload_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,23 @@ def call

# See the simple_form_for in
# app/views/idv/doc_auth/upload.html.erb
Comment on lines 20 to 21
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.

Question: Is this comment still relevant for the updated code?

Copy link
Copy Markdown
Contributor

@eric-gade eric-gade Apr 10, 2023

Choose a reason for hiding this comment

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

It's still relevant because that's where either the desktop or mobile params are set, based on the form being used (manual upload vs send a code). That said, this was a much more useful pointer when we were in the 50/50 and had 3 possible params.

if params[:type] == 'desktop'
handle_desktop_selection
else
return bypass_send_link_steps if mobile_device?
if hybrid_flow_chosen?
handle_phone_submission
else
bypass_send_link_steps
end
end

def hybrid_flow_chosen?
params[:type] != 'desktop' && !mobile_device?
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.

Perhaps an edge case, but curious: Should we be so restrictive here with device? If a user chooses to send a link to a phone number, should we just let that happen? Seems like that'd make the code a little simpler and respect the user's choice.

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.

I believe we should be able to remove the mobile device check. Users on mobile devices should not be getting to this step/screen in the first place.

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.

@eric-gade and I discussed this and the logic is arcanely complicated, so we're leaving further refactoring for the upcoming FSM extraction.

end

def extra_view_variables
{ idv_phone_form: build_form }
end

private

def handle_desktop_selection
if mobile_device?
send_user_to_email_sent_step
else
bypass_send_link_steps
end
end

def build_form
Idv::PhoneForm.new(
previous_params: {},
Expand Down Expand Up @@ -72,8 +67,6 @@ def handle_phone_submission
failure_reason: failure_reason,
)

mark_step_complete(:email_sent)

build_telephony_form_response(telephony_result)
end

Expand All @@ -89,17 +82,8 @@ def application
identity&.friendly_name || APP_NAME
end

def send_user_to_email_sent_step
mark_step_complete(:link_sent)
UserMailer.with(
user: current_user, email_address: current_user.confirmed_email_addresses.first,
).doc_auth_desktop_link_to_sp(application, link).deliver_now_or_later
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.

Looks like we could remove everything to do with this doc_auth_desktop_link_to_sp mailer as well?

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.

Removed, thanks!

form_response(destination: :email_sent)
end

def bypass_send_link_steps
mark_step_complete(:link_sent)
mark_step_complete(:email_sent)
if IdentityConfig.store.doc_auth_document_capture_controller_enabled
flow_session[:flow_path] = @flow.flow_path
redirect_to idv_document_capture_url
Expand Down
9 changes: 0 additions & 9 deletions app/views/idv/doc_auth/email_sent.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/user_mailer/doc_auth_desktop_link_to_sp.html.erb

This file was deleted.

2 changes: 0 additions & 2 deletions config/locales/doc_auth/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ en:
consent: By checking this box, you are letting %{app_name} ask for, use, keep,
and share your personal information. We will use it to verify your
identity.
email_sent: Link sent to %{email}. Please check your desktop email and follow
instructions to verify your identity.
learn_more: Learn more about our privacy and security measures
privacy: Our privacy and security standards
switch_back: Switch back to your computer to finish verifying your identity.
Expand Down
2 changes: 0 additions & 2 deletions config/locales/doc_auth/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ es:
consent: Al marcar esta casilla, usted permite que %{app_name} solicite,
utilice, conserve y comparta su información personal. Los utilizamos
para verificar su identidad.
email_sent: Enlace enviado a %{email}. Compruebe el correo electrónico de su
escritorio y siga las instrucciones para verificar su identidad.
learn_more: Obtenga más información sobre nuestras medidas de privacidad y seguridad
privacy: Nuestras normas de privacidad y seguridad
switch_back: Regrese a su computadora para continuar con la verificación de su
Expand Down
2 changes: 0 additions & 2 deletions config/locales/doc_auth/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ fr:
consent: En cochant cette case, vous autorisez %{app_name} à demander, utiliser,
conserver et partager vos renseignements personnels. Nous les utilisons
pour vérifier votre identité.
email_sent: Lien envoyé à %{email}. Veuillez vérifier votre email de bureau et
suivez les instructions pour vérifier votre identité.
learn_more: En savoir plus sur nos mesures de confidentialité et de sécurité
privacy: Nos normes de confidentialité et de sécurité
switch_back: Retournez sur votre ordinateur pour continuer à vérifier votre identité.
Expand Down
4 changes: 0 additions & 4 deletions config/locales/user_mailer/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ en:
link_text: Go to %{app_name}
reset_password_html: If you can’t remember your password, go to %{app_name} to reset it.
contact_link_text: contact us
doc_auth_link:
message: You’ve requested to verify your identity on a desktop computer. Please
sign in to %{sp_link}
subject: Verify your identity on a desktop computer
email_added:
header: A new email address was added to your %{app_name} profile.
help: If you did not make this change, sign in to your profile and manage your
Expand Down
4 changes: 0 additions & 4 deletions config/locales/user_mailer/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ es:
link_text: Ir a %{app_name}
reset_password_html: Si no recuerda su contraseña, vaya a %{app_name} para restablecerla.
contact_link_text: Contáctenos
doc_auth_link:
message: Ha solicitado verificar su identidad en una computadora de escritorio.
Inicie sesión en %{sp_link}
subject: Verifique su identidad en una computadora de escritorio
email_added:
header: Se agregó una nueva dirección de correo electrónico a su perfil de
%{app_name}.
Expand Down
4 changes: 0 additions & 4 deletions config/locales/user_mailer/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ fr:
reset_password_html: Si vous ne vous souvenez plus de votre mot de passe, allez
à %{app_name} pour le réinitialiser.
contact_link_text: communiquez avec nous
doc_auth_link:
message: Vous avez demandé à vérifier votre identité sur un ordinateur de
bureau. Veuillez vous connecter à %{sp_link}
subject: Vérifiez votre identité sur un ordinateur de bureau
email_added:
header: Une nouvelle adresse e-mail a été ajoutée à votre profil %{app_name}.
help: Si vous n’avez pas apporté cette modification, connectez-vous à votre
Expand Down
1 change: 0 additions & 1 deletion spec/controllers/idv/doc_auth_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ def mock_document_capture_step
'document_capture_session_uuid' => document_capture_session_uuid,
'Idv::Steps::WelcomeStep' => true,
'Idv::Steps::LinkSentStep' => true,
'Idv::Steps::EmailSentStep' => true,
'Idv::Steps::UploadStep' => true,
)
end
Expand Down
21 changes: 0 additions & 21 deletions spec/features/idv/doc_auth/email_sent_step_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/mailers/previews/user_mailer_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ def please_reset_password
UserMailer.with(user: user, email_address: email_address_record).please_reset_password
end

def doc_auth_desktop_link_to_sp
UserMailer.with(user: user, email_address: email_address_record).
doc_auth_desktop_link_to_sp('Example App', '/')
end

def letter_reminder
UserMailer.with(user: user, email_address: email_address_record).letter_reminder
end
Expand Down
27 changes: 0 additions & 27 deletions spec/mailers/user_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,33 +470,6 @@ def expect_email_body_to_have_help_and_contact_links
end
end

describe '#doc_auth_desktop_link_to_sp' do
let(:app) { 'login.gov' }
let(:link) { root_url }
let(:mail) do
UserMailer.with(user: user, email_address: email_address).
doc_auth_desktop_link_to_sp(app, link)
end

it_behaves_like 'a system email'
it_behaves_like 'an email that respects user email locale preference'

it 'sends to the current email' do
expect(mail.to).to eq [email_address.email]
end

it 'renders the subject' do
expect(mail.subject).to eq t('user_mailer.doc_auth_link.subject')
end

it 'renders the body' do
expect(mail.html_part.body).to have_link(app, href: link)

expect(mail.html_part.body).to \
have_content(strip_tags(I18n.t('user_mailer.doc_auth_link.message', sp_link: nil)))
end
end

describe '#letter_reminder' do
let(:mail) { UserMailer.with(user: user, email_address: email_address).letter_reminder }

Expand Down
10 changes: 0 additions & 10 deletions spec/support/features/doc_auth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ def idv_doc_auth_link_sent_step
idv_doc_auth_step_path(step: :link_sent)
end

def idv_doc_auth_email_sent_step
idv_doc_auth_step_path(step: :email_sent)
end

def complete_doc_auth_steps_before_welcome_step(expect_accessible: false)
visit idv_doc_auth_welcome_step unless current_path == idv_doc_auth_welcome_step
click_idv_continue if current_path == idv_mail_only_warning_path
Expand Down Expand Up @@ -137,12 +133,6 @@ def complete_document_capture_step_with_yml(proofing_yml)
expect(page).to have_current_path(idv_ssn_url, wait: 10)
end

def complete_doc_auth_steps_before_email_sent_step
allow(BrowserCache).to receive(:parse).and_return(mobile_device)
complete_doc_auth_steps_before_upload_step
complete_upload_step
end

def complete_doc_auth_steps_before_phone_otp_step(expect_accessible: false)
complete_doc_auth_steps_before_verify_step(expect_accessible: expect_accessible)
click_idv_continue
Expand Down