mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23: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>
16 lines
1.1 KiB
ERB
16 lines
1.1 KiB
ERB
<% content_for :title, "Sign logbook entry" %>
|
|
<% if @certificates.empty? %>
|
|
<section class="card card-body mb-5 max-w-3xl space-y-3">
|
|
<h2 class="card-title">Add your certificate</h2>
|
|
<%= form_with model: UserCertificate.new, url: certificates_path(return_to: request.path), class: "grid gap-2 sm:grid-cols-[1fr_10rem_auto]" do |f| %>
|
|
<%= f.select :kind, UserCertificate::KINDS.invert, {}, class: "input", "aria-label": "Kind of certificate" %>
|
|
<%= f.text_field :number, class: "input", placeholder: "Number", required: true, "aria-label": "Certificate number" %>
|
|
<%= f.submit "Add", class: "btn-secondary" %>
|
|
<% end %>
|
|
</section>
|
|
<% end %>
|
|
<%= render "entry_signatures/form", entry: @entry, url: invited_signing_path(params[:token]), cancel_path: root_path %>
|
|
<% unless current_user.otp_enabled? %>
|
|
<p class="mx-auto mt-4 max-w-3xl text-sm text-slate-600">Recommended: <%= link_to "add an authenticator app", new_two_factor_path(return_to: request.path), class: "link" %> to your account, so your signature can't be made with a stolen password alone.</p>
|
|
<% end %>
|