Sha256: e032fc74252983e269e98e51e8401fd4378edb0dc0e980d6f4adcd2589448dd3

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 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 :current_password, style: "display: block" %>
    <%%= form.password_field :current_password, required: true, autofocus: true, autocomplete: "current-password" %>
  </div>

  <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, autofocus: true, required: true, autocomplete: :off %>
  </div>

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authentication-zero-2.11.2 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt
authentication-zero-2.11.1 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt
authentication-zero-2.11.0 lib/generators/authentication/templates/erb/two_factor_authentication/totps/new.html.erb.tt