18F/identity-idp

View on GitHub
app/views/accounts/_webauthn_roaming.html.erb

Summary

Maintainability
Test Coverage
<h2 class="margin-top-0 margin-bottom-2">
  <%= t('account.index.webauthn') %>
</h2>


<p>
  <%= t('two_factor_authentication.two_factor_choice_options.webauthn_info') %>
</p>

<div role="list">
  <% MfaContext.new(current_user).webauthn_roaming_configurations.each do |configuration| %>
    <%= render ManageableAuthenticatorComponent.new(
          configuration:,
          user_session:,
          manage_url: edit_webauthn_path(id: configuration.id),
          manage_api_url: api_internal_two_factor_authentication_webauthn_path(id: configuration.id),
          custom_strings: {
            deleted: t('two_factor_authentication.webauthn_roaming.deleted'),
            renamed: t('two_factor_authentication.webauthn_roaming.renamed'),
            manage_accessible_label: t('two_factor_authentication.webauthn_roaming.manage_accessible_label'),
          },
          role: 'listitem',
        ) %>
  <% end %>
</div>

<%= render ButtonComponent.new(
      url: webauthn_setup_path,
      icon: :add,
      outline: true,
      class: 'margin-top-2',
    ).with_content(t('account.index.webauthn_add')) %>