logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

totp.html.eex (1356B)


  1. <%= if Phoenix.Flash.get(@flash, :info) do %>
  2. <p class="alert alert-info" role="alert"><%= Phoenix.Flash.get(@flash, :info) %></p>
  3. <% end %>
  4. <%= if Phoenix.Flash.get(@flash, :error) do %>
  5. <p class="alert alert-danger" role="alert"><%= Phoenix.Flash.get(@flash, :error) %></p>
  6. <% end %>
  7. <h2><%= Gettext.dpgettext("static_pages", "mfa auth page title", "Two-factor authentication") %></h2>
  8. <%= form_for @conn, Routes.mfa_verify_path(@conn, :verify), [as: "mfa"], fn f -> %>
  9. <div class="input">
  10. <%= label f, :code, Gettext.dpgettext("static_pages", "mfa auth code prompt", "Authentication code") %>
  11. <%= text_input f, :code, [autocomplete: "one-time-code", autocorrect: "off", autocapitalize: "off", autofocus: true, pattern: "[0-9]*", spellcheck: false] %>
  12. <%= hidden_input f, :mfa_token, value: @mfa_token %>
  13. <%= hidden_input f, :state, value: @state %>
  14. <%= hidden_input f, :redirect_uri, value: @redirect_uri %>
  15. <%= hidden_input f, :challenge_type, value: "totp" %>
  16. </div>
  17. <%= submit Gettext.dpgettext("static_pages", "mfa auth verify code button", "Verify") %>
  18. <% end %>
  19. <a href="<%= Routes.mfa_path(@conn, :show, %{challenge_type: "recovery", mfa_token: @mfa_token, state: @state, redirect_uri: @redirect_uri}) %>">
  20. <%= Gettext.dpgettext("static_pages", "mfa auth page use recovery code link", "Enter a two-factor recovery code") %>
  21. </a>