Sha256: 4291908ea3cb376ae86ada593443b31e9c2ec7954dd273c0ffbb7756283b3db8

Contents?: true

Size: 1.44 KB

Versions: 4

Compression:

Stored size: 1.44 KB

Contents

<p style="color: red"><%%= alert %></p>

<h1>Upgrade your security with 2FA</h1>

<h2>Step 1: Get an Authenticator App</h2>
<p>First, you'll need a 2FA authenticator app on your phone. <strong>If you already have one, skip to step 2.</strong></p>
<p><strong>If you don't have one, or you aren't sure, we recommend Microsoft Authenticator</strong>. You can download it free on the Apple App Store for iPhone, or Google Play Store for Android. Please grab your phone, search the store, and install it now.</p>

<h2>Step 2: Scan + Enter the Code</h2>
<p>Next, open the authenticator app, tap "Scan QR code" or "+", and, when it asks, point your phone's camera at this QR code picture below.</p>

<figure>
    <%%= image_tag @qr_code.as_png(resize_exactly_to: 200).to_data_url%>
    <figcaption>Point your camera here</figcaption>
</figure>

<%%= form_with(url: two_factor_authentication_totp_path) do |form| %>
  <%%= form.hidden_field :secret, value: @totp.secret %>

  <div>
    <%%= form.label :code, "After scanning with your camera, the app will generate a six-digit code. Enter it here:", style: "display: block" %>
    <%%= form.text_field :code, required: true, autofocus: true, autocomplete: :off %>
  </div>

  <div>
    <%%= form.label :current_password, style: "display: block" %>
    <%%= form.password_field :current_password, required: true, autocomplete: "current-password" %>
  </div>

  <div>
    <%%= form.submit "Verify and active" %>
  </div>
<%% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
authentication-zero-2.16.9 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt
authentication-zero-2.16.8 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt
authentication-zero-2.16.7 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt
authentication-zero-2.16.6 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt