mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
- 10 failed sign-ins in a row (password, authenticator code, or password at signing) lock an account for 15 minutes from any address; the user is emailed; admins can unlock. Same message as a wrong password. - Passwords: at least 12 characters (max 72), refused if found in Have I Been Pwned (k-anonymity range API; fails open; PWNED_PASSWORDS_CHECK=false) - Optional TOTP (authenticator app) with 10 recovery codes for password and emailed-link sign-in, and at signing (auth method password_totp); codes accepted once; admins can reset; SSO sign-in unaffected - Demo/test passwords updated; guide, README and procedures document Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
809 B
ERB
12 lines
809 B
ERB
<% content_for :title, "Sign in" %>
|
|
<div class="mx-auto max-w-sm">
|
|
<h1 class="mb-4 text-2xl font-bold">Authenticator code</h1>
|
|
<%= form_with url: two_factor_session_path, class: "card card-body space-y-4" do |form| %>
|
|
<p class="text-sm text-slate-600">Enter the 6-digit code from your authenticator app. Lost your phone? Enter one of your recovery codes instead.</p>
|
|
<div><%= form.label :code, "Code", class: "label" %>
|
|
<%= form.text_field :code, required: true, autofocus: true, autocomplete: "one-time-code", inputmode: "text", maxlength: 20, class: "input text-lg tracking-widest" %></div>
|
|
<%= form.submit "Continue", class: "btn-primary w-full justify-center" %>
|
|
<p class="text-center text-sm"><%= link_to "Start again", new_session_path, class: "link" %></p>
|
|
<% end %>
|
|
</div>
|