Files
simple-aircraft-manager-rails/app/views/two_factors/codes.html.erb
T
rickyandClaude Opus 5.5 14316bb60f Sign-in hardening: lockout, stronger passwords, authenticator codes
- 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>
2026-11-07 15:17:56 -05:00

10 lines
642 B
ERB

<% content_for :title, "Recovery codes" %>
<section class="card card-body mx-auto max-w-md space-y-4">
<h1 class="text-2xl font-bold">Save your recovery codes</h1>
<p class="text-sm text-slate-600">Two-factor is on. If you lose your phone, each of these codes signs you in once in place of an authenticator code. Print them or keep them in a password manager: they won't be shown again.</p>
<ul class="grid grid-cols-2 gap-2 rounded-md bg-slate-50 p-4 font-mono text-sm ring-1 ring-slate-200">
<% @codes.each do |c| %><li><%= c %></li><% end %>
</ul>
<%= link_to "Done", back_path, class: "btn-primary self-start" %>
</section>