diff --git a/app/controllers/concerns/two_factor_authenticatable_methods.rb b/app/controllers/concerns/two_factor_authenticatable_methods.rb index 41c7fa3abff..e4a8a4f924f 100644 --- a/app/controllers/concerns/two_factor_authenticatable_methods.rb +++ b/app/controllers/concerns/two_factor_authenticatable_methods.rb @@ -292,10 +292,6 @@ def otp_expiration current_user.direct_otp_sent_at + TwoFactorAuthenticatable::DIRECT_OTP_VALID_FOR_SECONDS end - def personal_key_unavailable? - current_user.encrypted_recovery_code_digest.blank? - end - def user_opted_remember_device_cookie cookies.encrypted[:user_opted_remember_device_preference] end @@ -305,15 +301,14 @@ def unconfirmed_phone? end def phone_view_data - { confirmation_for_add_phone: confirmation_for_add_phone?, + { + confirmation_for_add_phone: confirmation_for_add_phone?, phone_number: display_phone_to_deliver_to, code_value: direct_otp_code, otp_expiration: otp_expiration, otp_delivery_preference: two_factor_authentication_method, otp_make_default_number: selected_otp_make_default_number, - voice_otp_delivery_unsupported: voice_otp_delivery_unsupported?, - unconfirmed_phone: unconfirmed_phone?, - account_reset_token: account_reset_token }.merge(generic_data) + }.merge(generic_data) end def selected_otp_make_default_number @@ -333,8 +328,6 @@ def authenticator_view_data def generic_data { - personal_key_unavailable: personal_key_unavailable?, - reauthn: reauthn?, user_opted_remember_device_cookie: user_opted_remember_device_cookie, } end diff --git a/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb b/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb index a01649d9b74..ac5dbe925f8 100644 --- a/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb +++ b/app/controllers/two_factor_authentication/piv_cac_verification_controller.rb @@ -73,7 +73,6 @@ def piv_cac_view_data { two_factor_authentication_method: two_factor_authentication_method, hide_fallback_question: service_provider_mfa_policy.piv_cac_required?, - user_email: current_user.email_addresses.take.email, }.merge(generic_data) 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 266c05a6ebf..d30266f8526 100644 --- a/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/generic_delivery_presenter.rb @@ -61,6 +61,6 @@ def service_provider_mfa_policy ) end - attr_reader :personal_key_unavailable, :view, :user_opted_remember_device_cookie + attr_reader :view, :user_opted_remember_device_cookie 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 64c54545cc4..b6762ee59c6 100644 --- a/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb +++ b/app/presenters/two_factor_auth_code/phone_delivery_presenter.rb @@ -104,9 +104,7 @@ def troubleshoot_change_phone_or_method_option attr_reader( :phone_number, - :account_reset_token, :confirmation_for_add_phone, - :voice_otp_delivery_unsupported, ) end end diff --git a/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb b/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb index d835610e658..f50beaacc15 100644 --- a/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb +++ b/spec/presenters/two_factor_auth_code/phone_delivery_presenter_spec.rb @@ -11,10 +11,7 @@ phone_number: '5555559876', code_value: '999999', otp_delivery_preference: 'sms', - unconfirmed_phone: true, totp_enabled: false, - personal_key_unavailable: true, - reauthn: false, } end let(:presenter) do