summaryrefslogtreecommitdiff
path: root/app/views/otp_enrollments/show.html.erb
blob: 9dfa34223ded049abf4fb697b08ef577ea9150ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<h1>Enable second factor</h1>

<div id="page_editor">
  <div class="node_description">Scan</div>
  <div class="node_content">
    <%= raw RQRCode::QRCode.new(current_user.pending_otp_provisioning_uri)
              .as_svg(:module_size => 4, :viewbox => true,
                      :color => "000", :fill => "fff") %>
    <span class="field_hint">Or enter the secret manually:
      <code><%= current_user.otp_pending_secret %></code></span>
  </div>

  <div class="node_description">Confirm</div>
  <div class="node_content">
    <%= form_tag otp_enrollment_path, :method => :put do %>
      <%= text_field_tag :code, nil, :autofocus => true,
            :autocomplete => "one-time-code", :inputmode => "numeric" %>
      <%= submit_tag "Confirm" %>
    <% end %>
    <span class="field_hint">Enter the six-digit code your app shows
      for “<%= OTP_ISSUER %>”.</span>
  </div>
</div>