diff --git a/.rubocop.yml b/.rubocop.yml index 17a03dc423b..5c3589b13c5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -932,6 +932,7 @@ Style/AndOr: - conditionals Style/ArgumentsForwarding: + UseAnonymousForwarding: false Enabled: true Style/ArrayJoin: diff --git a/Gemfile b/Gemfile index de1eac11a26..51638653227 100644 --- a/Gemfile +++ b/Gemfile @@ -110,7 +110,7 @@ group :development, :test do gem 'pry-rails' gem 'psych' gem 'rspec-rails', '~> 6.0' - gem 'rubocop', '~> 1.43.0', require: false + gem 'rubocop', '~> 1.55.1', require: false gem 'rubocop-performance', '~> 1.15.0', require: false gem 'rubocop-rails', '>= 2.5.2', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index a35df8cc77e..efeae68cf6e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -366,6 +366,7 @@ GEM jwt (2.7.1) knapsack (4.0.0) rake + language_server-protocol (3.17.0.3) launchy (2.5.0) addressable (~> 2.7) letter_opener (1.8.1) @@ -439,13 +440,14 @@ GEM openssl-signature_algorithm (1.2.1) openssl (> 2.0, < 3.1) orm_adapter (0.5.0) - parallel (1.22.1) - parser (3.2.2.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) + racc pg (1.4.5) pg_query (2.2.0) google-protobuf (>= 3.19.2) - phonelib (0.6.54) + phonelib (0.8.2) pkcs11 (0.3.4) premailer (1.21.0) addressable @@ -589,18 +591,19 @@ GEM rspec-support (3.12.0) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.43.0) + rubocop (1.55.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.24.1, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.24.1) - parser (>= 3.1.1.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) rubocop-performance (1.15.2) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) @@ -819,7 +822,7 @@ DEPENDENCIES rspec-rails (~> 6.0) rspec-retry rspec_junit_formatter - rubocop (~> 1.43.0) + rubocop (~> 1.55.1) rubocop-performance (~> 1.15.0) rubocop-rails (>= 2.5.2) ruby-progressbar diff --git a/app/assets/images/loading-badge.gif b/app/assets/images/loading-badge.gif new file mode 100644 index 00000000000..729b9ad7f1c Binary files /dev/null and b/app/assets/images/loading-badge.gif differ diff --git a/app/assets/images/spinner.gif b/app/assets/images/spinner.gif deleted file mode 100644 index 8646d68e705..00000000000 Binary files a/app/assets/images/spinner.gif and /dev/null differ diff --git a/app/assets/images/spinner@2x.gif b/app/assets/images/spinner@2x.gif deleted file mode 100644 index 0cd600cca68..00000000000 Binary files a/app/assets/images/spinner@2x.gif and /dev/null differ diff --git a/app/assets/stylesheets/utilities/_util.scss b/app/assets/stylesheets/utilities/_util.scss index 804be19afaa..7b9cf34e837 100644 --- a/app/assets/stylesheets/utilities/_util.scss +++ b/app/assets/stylesheets/utilities/_util.scss @@ -13,15 +13,3 @@ html.js .no-js { backface-visibility: hidden; transform: scale(0.7); } - -@include at-media('tablet') { - .sm-left-align { - text-align: left; - } -} - -.half-center { - margin: 0 auto; - text-align: center; - width: 300px; -} diff --git a/app/components/block_link_component.rb b/app/components/block_link_component.rb index fad065041b1..9878ee58641 100644 --- a/app/components/block_link_component.rb +++ b/app/components/block_link_component.rb @@ -1,6 +1,8 @@ class BlockLinkComponent < BaseComponent attr_reader :url, :action, :new_tab, :tag_options + alias_method :new_tab?, :new_tab + def initialize(url:, action: tag.method(:a), new_tab: false, **tag_options) @action = action @url = url @@ -10,12 +12,12 @@ def initialize(url:, action: tag.method(:a), new_tab: false, **tag_options) def css_class classes = ['usa-link', 'block-link', *tag_options[:class]] - classes << 'usa-link--external' if new_tab + classes << 'usa-link--external' if new_tab? classes end def target - '_blank' if new_tab + '_blank' if new_tab? end def wrapper(&block) diff --git a/app/components/password_confirmation_component.html.erb b/app/components/password_confirmation_component.html.erb index 683da5ccd90..49014e370ad 100644 --- a/app/components/password_confirmation_component.html.erb +++ b/app/components/password_confirmation_component.html.erb @@ -3,7 +3,7 @@ form: form, name: :password, type: :password, - label: t('forms.password'), + label: password_label, required: true, **field_options, input_html: field_options[:input_html].to_h.merge( @@ -16,7 +16,7 @@ form: form, name: :password_confirmation, type: :password_confirmation, - label: t('components.password_confirmation.confirm_label'), + label: confirmation_label, required: true, **field_options, input_html: field_options[:input_html].to_h.merge( diff --git a/app/components/password_confirmation_component.rb b/app/components/password_confirmation_component.rb index 752d8ccf91a..508188f5649 100644 --- a/app/components/password_confirmation_component.rb +++ b/app/components/password_confirmation_component.rb @@ -3,14 +3,26 @@ class PasswordConfirmationComponent < BaseComponent def initialize( form:, + password_label: nil, + confirmation_label: nil, field_options: {}, **tag_options ) @form = form + @password_label = password_label + @confirmation_label = confirmation_label @field_options = field_options @tag_options = tag_options end + def password_label + @password_label || t('forms.password') + end + + def confirmation_label + @confirmation_label || t('components.password_confirmation.confirm_label') + end + def toggle_id "password-confirmation-toggle-#{unique_id}" end diff --git a/app/components/troubleshooting_options_component.rb b/app/components/troubleshooting_options_component.rb index efa7d693b1d..e15e6c25ea8 100644 --- a/app/components/troubleshooting_options_component.rb +++ b/app/components/troubleshooting_options_component.rb @@ -4,10 +4,19 @@ class TroubleshootingOptionsComponent < BaseComponent attr_reader :tag_options - def initialize(**tag_options) + def initialize(options: [], **tag_options) + @options_from_constructor = options @tag_options = tag_options.dup end + def options + @options_from_constructor.map(&method(:render)) + get_slot(:options) + end + + def options? + options.present? + end + def render? options? end diff --git a/app/components/webauthn_verify_button_component.html.erb b/app/components/webauthn_verify_button_component.html.erb index 3fd6f911410..2aaa4e3da84 100644 --- a/app/components/webauthn_verify_button_component.html.erb +++ b/app/components/webauthn_verify_button_component.html.erb @@ -9,8 +9,7 @@ ) do %>
{
event.preventDefault();
- document.getElementById('spinner')!.classList.remove('display-none');
- document.getElementById('continue-button')!.className = 'display-none';
+ document.getElementById('spinner')!.hidden = false;
const platformAuthenticator =
(document.getElementById('platform_authenticator') as HTMLInputElement).value === 'true';
diff --git a/app/models/profile.rb b/app/models/profile.rb
index 46a3e655bc1..ee755bfdfd2 100644
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -17,6 +17,11 @@ class Profile < ApplicationRecord
scope(:active, -> { where(active: true) })
scope(:verified, -> { where.not(verified_at: nil) })
+ has_one :establishing_in_person_enrollment,
+ -> { where(status: :establishing).order(created_at: :desc) },
+ class_name: 'InPersonEnrollment', foreign_key: :profile_id, inverse_of: :profile,
+ dependent: :destroy
+
enum deactivation_reason: {
password_reset: 1,
encryption_error: 2,
diff --git a/app/policies/service_provider_mfa_policy.rb b/app/policies/service_provider_mfa_policy.rb
index 156bc9882a5..fdf62e5a694 100644
--- a/app/policies/service_provider_mfa_policy.rb
+++ b/app/policies/service_provider_mfa_policy.rb
@@ -50,12 +50,6 @@ def piv_cac_required?
piv_cac_requested?
end
- def allow_user_to_switch_method?
- return false if piv_cac_required?
- return true unless phishing_resistant_required?
- piv_cac_enabled? && webauthn_enabled?
- end
-
def multiple_factors_enabled?
mfa_context.enabled_mfa_methods_count > 1
end
diff --git a/app/presenters/image_upload_response_presenter.rb b/app/presenters/image_upload_response_presenter.rb
index 27aab0ca155..bec72692816 100644
--- a/app/presenters/image_upload_response_presenter.rb
+++ b/app/presenters/image_upload_response_presenter.rb
@@ -37,7 +37,7 @@ def as_json(*)
json = { success: false, errors: errors, remaining_attempts: remaining_attempts }
if remaining_attempts&.zero?
if @form_response.extra[:flow_path] == 'standard'
- json[:redirect] = idv_session_errors_throttled_url
+ json[:redirect] = idv_session_errors_rate_limited_url
else # hybrid flow on mobile
json[:redirect] = idv_hybrid_mobile_capture_complete_url
end
diff --git a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb
index c85fc9e4071..5ff7bc822d3 100644
--- a/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb
+++ b/app/presenters/two_factor_auth_code/authenticator_delivery_presenter.rb
@@ -4,10 +4,6 @@ def header
t('two_factor_authentication.totp_header_text')
end
- def fallback_question
- t('two_factor_authentication.totp_fallback.question')
- end
-
def cancel_link
if reauthn
account_path
@@ -15,5 +11,9 @@ def cancel_link
sign_out_path
end
end
+
+ def redirect_location_step
+ :totp_verification
+ end
end
end
diff --git a/app/presenters/two_factor_auth_code/backup_code_presenter.rb b/app/presenters/two_factor_auth_code/backup_code_presenter.rb
index 9ff4e35abb7..4dd6a264147 100644
--- a/app/presenters/two_factor_auth_code/backup_code_presenter.rb
+++ b/app/presenters/two_factor_auth_code/backup_code_presenter.rb
@@ -10,8 +10,8 @@ def cancel_link
end
end
- def fallback_question
- t('two_factor_authentication.backup_code_fallback.question')
+ def redirect_location_step
+ :backup_code_verification
end
end
end
diff --git a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb
index 28d6d6fc4a6..5bb04e1b33c 100644
--- a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb
+++ b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb
@@ -4,7 +4,7 @@ class GenericDeliveryPresenter
include ActionView::Helpers::TranslationHelper
include Rails.application.routes.url_helpers
- attr_reader :code_value, :reauthn
+ attr_reader :code_value, :reauthn, :service_provider
def initialize(data:, view:, service_provider:, remember_device_default: true)
data.each do |key, value|
@@ -19,16 +19,30 @@ def header
raise NotImplementedError
end
- def link_text
- t('two_factor_authentication.login_options_link_text')
+ def redirect_location_step; end
+
+ def troubleshooting_options
+ [
+ choose_another_method_troubleshooting_option,
+ learn_more_about_authentication_options_troubleshooting_option,
+ ]
end
- def link_path
- login_two_factor_options_path
+ def choose_another_method_troubleshooting_option
+ BlockLinkComponent.new(url: login_two_factor_options_path).
+ with_content(t('two_factor_authentication.login_options_link_text'))
end
- def fallback_links
- raise NotImplementedError
+ def learn_more_about_authentication_options_troubleshooting_option
+ BlockLinkComponent.new(
+ url: help_center_redirect_path(
+ category: 'get-started',
+ article: 'authentication-options',
+ flow: :two_factor_authentication,
+ step: redirect_location_step,
+ ),
+ new_tab: true,
+ ).with_content(t('two_factor_authentication.learn_more'))
end
def remember_device_box_checked?
diff --git a/app/presenters/two_factor_auth_code/personal_key_presenter.rb b/app/presenters/two_factor_auth_code/personal_key_presenter.rb
index 5a1aeee1e06..b9820962987 100644
--- a/app/presenters/two_factor_auth_code/personal_key_presenter.rb
+++ b/app/presenters/two_factor_auth_code/personal_key_presenter.rb
@@ -2,8 +2,8 @@ module TwoFactorAuthCode
class PersonalKeyPresenter < TwoFactorAuthCode::GenericDeliveryPresenter
def initialize; end
- def fallback_question
- t('two_factor_authentication.personal_key_fallback.question')
+ def redirect_location_step
+ :personal_key_verification
end
end
end
diff --git a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb
index 21e4663fd80..1fc5f0ba08d 100644
--- a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb
+++ b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb
@@ -37,18 +37,10 @@ def phone_call_text
t('two_factor_authentication.otp_delivery_preference.phone_call')
end
- def fallback_question
- t('two_factor_authentication.phone_fallback.question')
- end
-
- def troubleshooting_header
- t('components.troubleshooting_options.default_heading')
- end
-
def troubleshooting_options
[
troubleshoot_change_phone_or_method_option,
- {
+ BlockLinkComponent.new(
url: help_center_redirect_path(
category: 'get-started',
article: 'authentication-options',
@@ -56,19 +48,11 @@ def troubleshooting_options
flow: :two_factor_authentication,
step: :otp_confirmation,
),
- text: t('two_factor_authentication.phone_verification.troubleshooting.code_not_received'),
- new_tab: true,
- },
- {
- url: help_center_redirect_path(
- category: 'get-started',
- article: 'authentication-options',
- flow: :two_factor_authentication,
- step: :otp_confirmation,
- ),
- text: t('two_factor_authentication.learn_more'),
new_tab: true,
- },
+ ).with_content(
+ t('two_factor_authentication.phone_verification.troubleshooting.code_not_received'),
+ ),
+ learn_more_about_authentication_options_troubleshooting_option,
]
end
@@ -81,19 +65,21 @@ def cancel_link
end
end
+ def redirect_location_step
+ :otp_confirmation
+ end
+
private
def troubleshoot_change_phone_or_method_option
if unconfirmed_phone
- {
- url: add_phone_path,
- text: t('two_factor_authentication.phone_verification.troubleshooting.change_number'),
- }
+ BlockLinkComponent.new(url: add_phone_path).with_content(
+ t('two_factor_authentication.phone_verification.troubleshooting.change_number'),
+ )
else
- {
- url: login_two_factor_options_path,
- text: t('two_factor_authentication.login_options_link_text'),
- }
+ BlockLinkComponent.new(url: login_two_factor_options_path).with_content(
+ t('two_factor_authentication.login_options_link_text'),
+ )
end
end
diff --git a/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb b/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb
index ab67d0327f3..4e77b7851ad 100644
--- a/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb
+++ b/app/presenters/two_factor_auth_code/piv_cac_authentication_presenter.rb
@@ -6,46 +6,10 @@ def header
t('two_factor_authentication.piv_cac_header_text')
end
- def piv_cac_help
- if service_provider_mfa_policy.phishing_resistant_required? &&
- service_provider_mfa_policy.allow_user_to_switch_method?
- t('instructions.mfa.piv_cac.confirm_piv_cac_or_aal3')
- elsif service_provider_mfa_policy.phishing_resistant_required? ||
- service_provider_mfa_policy.piv_cac_required?
- t('instructions.mfa.piv_cac.confirm_piv_cac_only')
- else
- t('instructions.mfa.piv_cac.confirm_piv_cac')
- end
- end
-
def piv_cac_capture_text
t('forms.piv_cac_mfa.submit')
end
- def link_text
- if service_provider_mfa_policy.phishing_resistant_required?
- if service_provider_mfa_policy.allow_user_to_switch_method?
- t('two_factor_authentication.piv_cac_webauthn_available')
- else
- ''
- end
- else
- super
- end
- end
-
- def link_path
- if service_provider_mfa_policy.phishing_resistant_required?
- if service_provider_mfa_policy.allow_user_to_switch_method?
- login_two_factor_webauthn_url
- else
- ''
- end
- else
- super
- end
- end
-
def cancel_link
if reauthn
account_path
@@ -54,17 +18,12 @@ def cancel_link
end
end
- def piv_cac_service_link
- login_two_factor_piv_cac_present_piv_cac_url
+ def redirect_location_step
+ :piv_cac_verification
end
- def fallback_question
- return if @hide_fallback_question
- if service_provider_mfa_policy.allow_user_to_switch_method?
- t('two_factor_authentication.piv_cac_fallback.question')
- else
- ''
- end
+ def piv_cac_service_link
+ login_two_factor_piv_cac_present_piv_cac_url
end
end
end
diff --git a/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb b/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb
index 7b143474850..392f2a06d91 100644
--- a/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb
+++ b/app/presenters/two_factor_auth_code/webauthn_authentication_presenter.rb
@@ -17,12 +17,7 @@ def initialize(data:, view:, service_provider:, remember_device_default: true,
end
def webauthn_help
- if service_provider_mfa_policy.phishing_resistant_required? &&
- service_provider_mfa_policy.allow_user_to_switch_method?
- t('instructions.mfa.webauthn.confirm_webauthn_or_aal3')
- elsif service_provider_mfa_policy.phishing_resistant_required?
- t('instructions.mfa.webauthn.confirm_webauthn_only')
- elsif platform_authenticator?
+ if platform_authenticator?
t('instructions.mfa.webauthn.confirm_webauthn_platform', app_name: APP_NAME)
else
t('instructions.mfa.webauthn.confirm_webauthn')
@@ -45,28 +40,21 @@ def header
end
end
- def link_text
- if service_provider_mfa_policy.phishing_resistant_required?
- if service_provider_mfa_policy.allow_user_to_switch_method?
- t('two_factor_authentication.webauthn_piv_available')
- else
- ''
- end
- else
- super
- end
- end
-
- def link_path
- if service_provider_mfa_policy.phishing_resistant_required?
- if service_provider_mfa_policy.allow_user_to_switch_method?
- login_two_factor_piv_cac_url
- else
- ''
- end
- else
- super
+ def troubleshooting_options
+ options = [choose_another_method_troubleshooting_option]
+ if platform_authenticator?
+ options << BlockLinkComponent.new(
+ url: help_center_redirect_path(
+ category: 'trouble-signing-in',
+ article: 'face-or-touch-unlock',
+ flow: :two_factor_authentication,
+ step: redirect_location_step,
+ ),
+ new_tab: true,
+ ).with_content(t('instructions.mfa.webauthn_platform.learn_more_help'))
end
+ options << learn_more_about_authentication_options_troubleshooting_option
+ options
end
def cancel_link
@@ -77,6 +65,10 @@ def cancel_link
end
end
+ def redirect_location_step
+ :webauthn_verification
+ end
+
def multiple_factors_enabled?
service_provider_mfa_policy.multiple_factors_enabled?
end
diff --git a/app/presenters/two_factor_login_options_presenter.rb b/app/presenters/two_factor_login_options_presenter.rb
index fca7e808f19..355e06fc5ad 100644
--- a/app/presenters/two_factor_login_options_presenter.rb
+++ b/app/presenters/two_factor_login_options_presenter.rb
@@ -1,7 +1,10 @@
class TwoFactorLoginOptionsPresenter < TwoFactorAuthCode::GenericDeliveryPresenter
include ActionView::Helpers::TranslationHelper
- attr_reader :user
+ attr_reader :user, :phishing_resistant_required, :piv_cac_required
+
+ alias_method :phishing_resistant_required?, :phishing_resistant_required
+ alias_method :piv_cac_required?, :piv_cac_required
def initialize(
user:,
@@ -31,6 +34,14 @@ def info
t('two_factor_authentication.login_intro')
end
+ def restricted_options_warning_text
+ if piv_cac_required?
+ t('two_factor_authentication.aal2_request.piv_cac_only_html', sp_name:)
+ elsif phishing_resistant_required?
+ t('two_factor_authentication.aal2_request.phishing_resistant_html', sp_name:)
+ end
+ end
+
def options
mfa = MfaContext.new(user)
@@ -107,4 +118,12 @@ def account_reset_token
def account_reset_token_valid?
user&.account_reset_request&.granted_token_valid?
end
+
+ def sp_name
+ if service_provider
+ service_provider.friendly_name
+ else
+ APP_NAME
+ end
+ end
end
diff --git a/app/presenters/webauthn_setup_presenter.rb b/app/presenters/webauthn_setup_presenter.rb
index 8541894641a..d931f55cab9 100644
--- a/app/presenters/webauthn_setup_presenter.rb
+++ b/app/presenters/webauthn_setup_presenter.rb
@@ -86,20 +86,4 @@ def button_text
t('forms.webauthn_setup.continue')
end
end
-
- def setup_heading
- if @platform_authenticator
- t('forms.webauthn_platform_setup.instructions_title')
- else
- t('forms.webauthn_setup.instructions_title')
- end
- end
-
- def setup_instructions
- if @platform_authenticator
- t('forms.webauthn_platform_setup.instructions_text', app_name: APP_NAME)
- else
- t('forms.webauthn_setup.instructions_text', app_name: APP_NAME)
- end
- end
end
diff --git a/app/services/doc_auth/errors.rb b/app/services/doc_auth/errors.rb
index e223bdef05a..d93a101ac5c 100644
--- a/app/services/doc_auth/errors.rb
+++ b/app/services/doc_auth/errors.rb
@@ -83,25 +83,18 @@ module Errors
BARCODE_CONTENT_CHECK => { long_msg: BARCODE_CONTENT_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
BARCODE_READ_CHECK => { long_msg: BARCODE_READ_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
BIRTH_DATE_CHECKS => { long_msg: BIRTH_DATE_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- BIRTH_DATE_CHECKS => { long_msg: BIRTH_DATE_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
CONTROL_NUMBER_CHECK => { long_msg: CONTROL_NUMBER_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
ID_NOT_RECOGNIZED => { long_msg: ID_NOT_RECOGNIZED, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
DOC_CROSSCHECK => { long_msg: DOC_CROSSCHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
DOCUMENT_EXPIRED_CHECK => { long_msg: DOCUMENT_EXPIRED_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
DOC_NUMBER_CHECKS => { long_msg: DOC_NUMBER_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
EXPIRATION_CHECKS => { long_msg: EXPIRATION_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- EXPIRATION_CHECKS => { long_msg: EXPIRATION_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
FULL_NAME_CHECK => { long_msg: FULL_NAME_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
ISSUE_DATE_CHECKS => { long_msg: ISSUE_DATE_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- ISSUE_DATE_CHECKS => { long_msg: ISSUE_DATE_CHECKS, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- ID_NOT_VERIFIED => { long_msg: ID_NOT_VERIFIED, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
ID_NOT_VERIFIED => { long_msg: ID_NOT_VERIFIED, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
VISIBLE_PHOTO_CHECK => { long_msg: VISIBLE_PHOTO_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- ID_NOT_VERIFIED => { long_msg: ID_NOT_VERIFIED, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
SEX_CHECK => { long_msg: SEX_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
VISIBLE_COLOR_CHECK => { long_msg: VISIBLE_COLOR_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- ID_NOT_VERIFIED => { long_msg: ID_NOT_VERIFIED, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
- VISIBLE_PHOTO_CHECK => { long_msg: VISIBLE_PHOTO_CHECK, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
# Multiple Errors
MULTIPLE_FRONT_ID_FAILURES => { long_msg: MULTIPLE_FRONT_ID_FAILURES, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
MULTIPLE_BACK_ID_FAILURES => { long_msg: MULTIPLE_BACK_ID_FAILURES, field_msg: FALLBACK_FIELD_LEVEL, hints: true },
diff --git a/app/services/idv/steps/doc_auth_base_step.rb b/app/services/idv/steps/doc_auth_base_step.rb
index a55a79bcdea..593bb51d77a 100644
--- a/app/services/idv/steps/doc_auth_base_step.rb
+++ b/app/services/idv/steps/doc_auth_base_step.rb
@@ -26,25 +26,6 @@ def save_proofing_components
ProofingComponent.create_or_find_by(user: current_user).update(component_attributes)
end
- # @param [DocAuth::Response,
- # DocumentCaptureSessionAsyncResult,
- # DocumentCaptureSessionResult] response
- def extract_pii_from_doc(response, store_in_session: false)
- pii_from_doc = response.pii_from_doc.merge(
- uuid: effective_user.uuid,
- phone: effective_user.phone_configurations.take&.phone,
- uuid_prefix: ServiceProvider.find_by(issuer: sp_session[:issuer])&.app_id,
- )
-
- flow_session[:had_barcode_read_failure] = response.attention_with_barcode?
- if store_in_session
- flow_session[:pii_from_doc] ||= {}
- flow_session[:pii_from_doc].merge!(pii_from_doc)
- idv_session.delete('applicant')
- end
- track_document_state(pii_from_doc[:state])
- end
-
def user_id_from_token
flow_session[:doc_capture_user_id]
end
@@ -66,7 +47,7 @@ def rate_limited_response
end
def rate_limited_url
- idv_session_errors_throttled_url
+ idv_session_errors_rate_limited_url
end
# Ideally we would not have to re-implement the EffectiveUser mixin
diff --git a/app/views/accounts/_header.html.erb b/app/views/accounts/_header.html.erb
index cae5b301c54..46f293e67e4 100644
--- a/app/views/accounts/_header.html.erb
+++ b/app/views/accounts/_header.html.erb
@@ -1,15 +1,15 @@
<%= t('instructions.password.password_key') %>
++ <%= t('instructions.password.password_key') %> +
<%= simple_form_for( @reset_password_form, @@ -12,13 +14,12 @@ ) do |f| %> <%= f.input :reset_password_token, as: :hidden %> <%= f.full_error :reset_password_token %> - <%= render PasswordToggleComponent.new( + <%= render PasswordConfirmationComponent.new( form: f, + password_label: t('forms.passwords.edit.labels.password'), field_options: { - label: t('forms.passwords.edit.labels.password'), - required: true, input_html: { - autocomplete: 'new-password', + aria: { describedby: 'password-description' }, }, }, ) %> diff --git a/app/views/idv/phone/new.html.erb b/app/views/idv/phone/new.html.erb index 8676e1d388a..ad97b710ce5 100644 --- a/app/views/idv/phone/new.html.erb +++ b/app/views/idv/phone/new.html.erb @@ -83,6 +83,8 @@ idv_gpo_path, ), ) %> + <% else %> + <%= t('idv.messages.phone.failed_number.try_again_html') %> <% end %> <% end %> diff --git a/app/views/idv/phone_errors/failure.html.erb b/app/views/idv/phone_errors/failure.html.erb index 43e8895946a..594d7837e8f 100644 --- a/app/views/idv/phone_errors/failure.html.erb +++ b/app/views/idv/phone_errors/failure.html.erb @@ -4,11 +4,6 @@ heading: t('idv.failure.phone.rate_limited.heading'), current_step: :verify_phone_or_address, options: [ - decorated_session.sp_name && { - url: return_to_sp_failure_to_proof_path(step: 'phone', location: request.params[:action]), - text: t('idv.troubleshooting.options.get_help_at_sp', sp_name: decorated_session.sp_name), - new_tab: true, - }, { url: MarketingSite.contact_url, text: t('idv.troubleshooting.options.contact_support', app_name: APP_NAME), @@ -17,19 +12,26 @@ ].select(&:present?), ) do %>- <%= t( - 'idv.failure.phone.rate_limited.body', - time_left: distance_of_time_in_words( - Time.zone.now, - [@expires_at, Time.zone.now].compact.max, - except: :seconds, - ), - ) %> + <%= t('idv.failure.phone.rate_limited.body') %>
+ <%= t('idv.failure.phone.rate_limited.options_header') %> +- <%= t('idv.failure.phone.rate_limited.gpo.prompt') %> -
- <%= @presenter.piv_cac_help %> + <%= t('instructions.mfa.piv_cac.confirm_piv_cac') %>