Skip to content
2 changes: 1 addition & 1 deletion app/controllers/account_reset/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def create_account_reset_request
def confirm_two_factor_enabled
return if MfaPolicy.new(current_user).two_factor_enabled?

redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end

def analytics_attributes
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def add_piv_cac_setup_url
end

def service_provider_mfa_setup_url
service_provider_mfa_policy.user_needs_sp_auth_method_setup? ? two_factor_options_url : nil
service_provider_mfa_policy.user_needs_sp_auth_method_setup? ?
authentication_methods_setup_url : nil
end

def fix_broken_personal_key_url
Expand Down Expand Up @@ -312,7 +313,7 @@ def prompt_to_sign_in_with_request_id(request_id)
end

def prompt_to_setup_mfa
redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end

def prompt_to_verify_mfa
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/sign_up/passwords_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def process_unsuccessful_password_creation

def sign_in_and_redirect_user
sign_in @user
redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create
def check_personal_key_enabled
return if TwoFactorAuthentication::PersonalKeyPolicy.new(current_user).enabled?

redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end

def presenter_for_two_factor_authentication_method
Expand Down Expand Up @@ -97,7 +97,7 @@ def handle_valid_otp
elsif MfaPolicy.new(current_user).two_factor_enabled?
redirect_to after_mfa_setup_path
else
redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end
reset_otp_session_data
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def load_phone

def other_options_mfa_url
if new_user?
two_factor_options_path
authentication_methods_setup_path
elsif has_other_auth_methods? && !user_fully_authenticated?
login_two_factor_options_path
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/two_factor_authentication_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def redirect_on_nothing_enabled
if MfaPolicy.new(current_user).two_factor_enabled?
redirect_to login_two_factor_options_path
else
redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end
end

Expand Down Expand Up @@ -308,7 +308,7 @@ def handle_too_many_confirmation_sends
if user_fully_authenticated?
redirect_to account_url
else
redirect_to two_factor_options_url
redirect_to authentication_methods_setup_url
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ def create
elsif (result.errors[:selection].include? 'phone') ||
IdentityConfig.store.kantara_2fa_phone_restricted
flash[:phone_error] = t('errors.two_factor_auth_setup.must_select_additional_option')
redirect_to two_factor_options_path(anchor: 'select_phone')
redirect_to authentication_methods_setup_path(anchor: 'select_phone')
else
@presenter = two_factor_options_presenter
render :index
end
rescue ActionController::ParameterMissing
flash[:error] = t('errors.two_factor_auth_setup.must_select_option')
redirect_back(fallback_location: two_factor_options_path, allow_other_host: false)
redirect_back(fallback_location: authentication_methods_setup_path, allow_other_host: false)
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/cancellation_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(referer:, url_options:)
end

def go_back_path
referer_path || two_factor_options_path
referer_path || authentication_methods_setup_path
end

def url_options
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/doc_auth/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<%= render 'shared/cancel', link: idv_cancel_path(step: 'welcome') %>
<% else %>
<div class='margin-top-2 padding-top-2 border-top border-primary-light'>
<%= link_to(t('two_factor_authentication.choose_another_option'), two_factor_options_path) %>
<%= link_to(t('two_factor_authentication.choose_another_option'), authentication_methods_setup_path) %>
</div>
<% end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_cancel_or_back_to_options.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<% if MfaPolicy.new(current_user).two_factor_enabled? %>
<%= link_to t('links.cancel'), account_path %>
<% else %>
<%= link_to t('two_factor_authentication.choose_another_option'), two_factor_options_path %>
<%= link_to t('two_factor_authentication.choose_another_option'), authentication_methods_setup_path %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/users/phone_setup/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
<% end %>

<%= render PageFooterComponent.new do %>
<%= link_to t('two_factor_authentication.choose_another_option'), two_factor_options_path %>
<%= link_to t('two_factor_authentication.choose_another_option'), authentication_methods_setup_path %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<% if MfaPolicy.new(current_user).two_factor_enabled? %>
<%= link_to t('links.cancel'), account_path %>
<% else %>
<%= link_to t('two_factor_authentication.choose_another_option'), two_factor_options_path %>
<%= link_to t('two_factor_authentication.choose_another_option'), authentication_methods_setup_path %>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<%= validated_form_for @two_factor_options_form,
html: { autocomplete: 'off' },
method: :patch,
url: two_factor_options_path do |f| %>
url: authentication_methods_setup_path do |f| %>
<div class="margin-bottom-4">
<fieldset class="margin-0 padding-0 border-0">
<legend class="margin-bottom-2 usa-sr-only"><%= @presenter.intro %></legend>
Expand Down
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,10 @@
post '/account/personal_key' => 'accounts/personal_keys#create'

get '/otp/send' => 'users/two_factor_authentication#send_code'

get '/authentication_methods_setup' => 'users/two_factor_authentication_setup#index'
patch '/authentication_methods_setup' => 'users/two_factor_authentication_setup#create'
get '/two_factor_options' => 'users/two_factor_authentication_setup#index'
get '/two_factor_options', to: redirect('/authentication_methods_setup')
patch '/two_factor_options' => 'users/two_factor_authentication_setup#create'
get '/second_mfa_setup' => 'users/mfa_selection#index'
patch '/second_mfa_setup' => 'users/mfa_selection#update'
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/account_reset/request_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
stub_sign_in_before_2fa
get :show

expect(response).to redirect_to two_factor_options_url
expect(response).to redirect_to authentication_methods_setup_url
end

it 'logs the visit to analytics' do
Expand Down Expand Up @@ -100,7 +100,7 @@
stub_sign_in_before_2fa
post :create

expect(response).to redirect_to two_factor_options_url
expect(response).to redirect_to authentication_methods_setup_url
end
end
end
2 changes: 1 addition & 1 deletion spec/controllers/application_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def index

get :index

expect(response).to redirect_to two_factor_options_url
expect(response).to redirect_to authentication_methods_setup_url
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
get :show

expect(response.status).to eq(302)
expect(response.location).to eq(two_factor_options_url)
expect(response.location).to eq(authentication_methods_setup_url)
end
end

Expand Down Expand Up @@ -90,7 +90,7 @@
post :create, params: { personal_key_form: { personal_key: raw_key } }

expect(response.status).to eq(302)
expect(response.location).to eq(two_factor_options_url)
expect(response.location).to eq(authentication_methods_setup_url)
end

context 'when the personal key field is empty' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def index
stub_sign_in_before_2fa(build(:user))
get :show

expect(response).to redirect_to two_factor_options_url
expect(response).to redirect_to authentication_methods_setup_url
end
end

Expand Down Expand Up @@ -265,7 +265,7 @@ def index
it 'redirects to MFA setup if no PIV/CAC is enabled' do
get :show

expect(response).to redirect_to(two_factor_options_url)
expect(response).to redirect_to(authentication_methods_setup_url)
end
end
end
Expand Down Expand Up @@ -506,7 +506,7 @@ def index
timeout: timeout,
),
)
expect(response).to redirect_to two_factor_options_url
expect(response).to redirect_to authentication_methods_setup_url
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
end

it 'the redirect to the form page with an anchor' do
expect(response).to redirect_to(two_factor_options_path(anchor: 'select_phone'))
expect(response).to redirect_to(authentication_methods_setup_path(anchor: 'select_phone'))
end
it 'contains a flash message' do
expect(flash[:phone_error]).to eq(
Expand Down
2 changes: 1 addition & 1 deletion spec/features/accessibility/user_pages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
scenario 'two factor options page' do
sign_up_and_set_password

expect(current_path).to eq(two_factor_options_path)
expect(current_path).to eq(authentication_methods_setup_path)
expect(page).to be_axe_clean.according_to :section508, :"best-practice", :wcag21aa
expect(page).to label_required_fields
expect(page).to be_uniquely_titled
Expand Down
4 changes: 2 additions & 2 deletions spec/features/openid_connect/aal3_required_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
visit_idp_from_ial1_oidc_sp_requesting_aal3(prompt: 'select_account')
sign_in_live_with_2fa(user)

expect(current_url).to eq(two_factor_options_url)
expect(current_url).to eq(authentication_methods_setup_url)
expect(page).to have_content(t('two_factor_authentication.two_factor_aal3_choice'))
expect(page).to have_xpath("//img[@alt='important alert icon']")
end
Expand Down Expand Up @@ -43,7 +43,7 @@
visit_idp_from_ial1_oidc_sp_defaulting_to_aal3(prompt: 'select_account')
sign_in_live_with_2fa(user)

expect(current_url).to eq(two_factor_options_url)
expect(current_url).to eq(authentication_methods_setup_url)
expect(page).to have_content(t('two_factor_authentication.two_factor_aal3_choice'))
expect(page).to have_xpath("//img[@alt='important alert icon']")
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/phone/confirmation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def expect_successful_otp_confirmation(delivery_method)
def expect_failed_otp_confirmation(_delivery_method)
visit account_path

expect(current_path).to eq(two_factor_options_path)
expect(current_path).to eq(authentication_methods_setup_path)
expect(phone_configuration).to be_nil
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/saml/aal3_required_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
sign_in_and_2fa_user(user_with_2fa)
visit_saml_authn_request_url(overrides: { issuer: aal3_issuer, authn_context: nil })

expect(current_url).to eq(two_factor_options_url)
expect(current_url).to eq(authentication_methods_setup_url)
expect(page).to have_content(t('two_factor_authentication.two_factor_aal3_choice'))
expect(page).to have_xpath("//img[@alt='important alert icon']")
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/saml/ial1_sso_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@

visit saml_authn_request_url

expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/features/saml/saml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MockSession; end
end

it 'prompts the user to set up 2FA' do
expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path
end

it 'prompts the user to confirm phone after setting up 2FA' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
scenario 'user can set up 2 MFA methods properly' do
sign_in_before_2fa

expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path

click_2fa_option('phone')
click_2fa_option('backup_code')
Expand Down Expand Up @@ -43,7 +43,7 @@
scenario 'user can select 1 MFA methods and will be prompted to add another method' do
sign_in_before_2fa

expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path

click_2fa_option('backup_code')

Expand Down Expand Up @@ -81,7 +81,7 @@
to have_content(t('errors.two_factor_auth_setup.must_select_additional_option'))
expect(
URI.parse(current_url).path + '#' + URI.parse(current_url).fragment,
).to eq two_factor_options_path(anchor: 'select_phone')
).to eq authentication_methods_setup_path(anchor: 'select_phone')
end

scenario 'clears the error when another mfa method is selected' do
Expand Down
4 changes: 2 additions & 2 deletions spec/features/two_factor_authentication/sign_in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

attempt_to_bypass_2fa_setup

expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path

select_2fa_option('phone')

Expand Down Expand Up @@ -55,7 +55,7 @@

click_on t('two_factor_authentication.choose_another_option')

expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/features/users/sign_in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
submit_form_with_valid_email(email)
click_confirmation_link_in_email(email)
submit_form_with_valid_password
expect(page).to have_current_path(two_factor_options_path)
expect(page).to have_current_path(authentication_methods_setup_path)

select_2fa_option('phone')
fill_in :new_phone_form_phone, with: '2025551314'
Expand Down Expand Up @@ -930,7 +930,7 @@
fill_in_code_with_last_phone_otp
click_submit_default

expect(current_path).to eq two_factor_options_path
expect(current_path).to eq authentication_methods_setup_path
select_2fa_option('piv_cac')

expect(page).to have_current_path setup_piv_cac_path
Expand Down
6 changes: 3 additions & 3 deletions spec/features/users/sign_up_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
Throttle.attempt_window_in_minutes(:phone_confirmation).minutes,
)

expect(current_path).to eq(two_factor_options_path)
expect(current_path).to eq(authentication_methods_setup_path)
expect(page).to have_content(
I18n.t(
'errors.messages.phone_confirmation_throttled',
Expand Down Expand Up @@ -303,7 +303,7 @@
click_confirmation_link_in_email(email)
submit_form_with_valid_password

expect(page).to have_current_path(two_factor_options_path)
expect(page).to have_current_path(authentication_methods_setup_path)
end
end
end
Expand All @@ -322,7 +322,7 @@

it 'redirects back with an error if the user does not select 2FA option' do
sign_in_user
visit two_factor_options_path
visit authentication_methods_setup_path
click_on 'Continue'

expect(page).to have_content(t('errors.two_factor_auth_setup.must_select_option'))
Expand Down
Loading