lib/generators/authentication/templates/erb/two_factor_authentication/challenges/new.html.erb.tt in authentication-zero-2.16.15 vs lib/generators/authentication/templates/erb/two_factor_authentication/challenges/new.html.erb.tt in authentication-zero-2.16.16
- old
+ new
@@ -1,16 +1,7 @@
<p style="color: red"><%%= alert %></p>
-<%%= form_with(url: two_factor_authentication_challenge_path) do |form| %>
- <%%= form.hidden_field :token, value: params[:token] %>
-
- <div>
- <%%= form.label :code do %>
- <h1>Next, open the 2FA authenticator app on your phone and type the six digit code below:</h1>
- <%% end %>
- <%%= form.text_field :code, autofocus: true, required: true, autocomplete: :off %>
- </div>
-
- <div>
- <%%= form.submit "Verify" %>
- </div>
+<%% if params[:scheme_type] == "recovery_codes" %>
+ <%%= render "recovery_code_form" %>
+<%% else %>
+ <%%= render "totp_form" %>
<%% end %>