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
13 changes: 0 additions & 13 deletions app/controllers/concerns/two_factor_authenticatable_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,6 @@ def selected_otp_make_default_number
params&.dig(:otp_make_default_number)
end

def account_reset_token
current_user&.account_reset_request&.request_token
end

def authenticator_view_data
{
two_factor_authentication_method: two_factor_authentication_method,
Expand All @@ -334,15 +330,6 @@ def display_phone_to_deliver_to
end
end

def voice_otp_delivery_unsupported?
if UserSessionContext.authentication_or_reauthentication_context?(context)
PhoneNumberCapabilities.new(phone_configuration&.phone, phone_confirmed: true).supports_voice?
else
phone = user_session[:unconfirmed_phone]
PhoneNumberCapabilities.new(phone, phone_confirmed: false).supports_voice?
end
end

def decorated_user
current_user.decorate
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,4 @@
expect(presenter.phone_call_text).to eq phone_call
end
end

def account_reset_cancel_link(account_reset_token)
I18n.t(
'two_factor_authentication.account_reset.pending_html', cancel_link:
view.link_to(
t('two_factor_authentication.account_reset.cancel_link'),
account_reset_cancel_url(token: account_reset_token),
)
)
end

def account_reset_delete_account_link
I18n.t(
'two_factor_authentication.account_reset.text_html', link:
view.link_to(
t('two_factor_authentication.account_reset.link'),
account_reset_recovery_options_path(locale: LinkLocaleResolver.locale),
)
)
end
end