rodauth-rails 0.16.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +54 -0
- data/README.md +97 -36
- data/lib/generators/rodauth/install_generator.rb +11 -3
- data/lib/generators/rodauth/migration/base.erb +8 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +7 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb +26 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_footer.html.erb +7 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_header.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/add_recovery_codes.html.erb +7 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb +29 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb +29 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb +15 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb +13 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb +37 -7
- data/lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb +7 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/login.html.erb +5 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb +16 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/multi_phase_login.html.erb +5 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb +17 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb +15 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb +30 -10
- data/lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +13 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/recovery_codes.html.erb +15 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb +14 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb +21 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +19 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb +17 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +17 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb +15 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb +7 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb +25 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_auth.html.erb +5 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +15 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_manage.html.erb +17 -15
- data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb +17 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +11 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb +23 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +19 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +7 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +13 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +21 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +21 -9
- data/lib/generators/rodauth/templates/app/views/rodauth_mailer/email_auth.text.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth_mailer/reset_password.text.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth_mailer/unlock_account.text.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_account.text.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_login_change.text.erb +3 -3
- data/lib/generators/rodauth/views_generator.rb +55 -93
- data/lib/rodauth/rails/app.rb +4 -0
- data/lib/rodauth/rails/controller_methods.rb +1 -2
- data/lib/rodauth/rails/feature/base.rb +9 -0
- data/lib/rodauth/rails/feature/csrf.rb +15 -4
- data/lib/rodauth/rails/feature/internal_request.rb +16 -20
- data/lib/rodauth/rails/feature/render.rb +1 -1
- data/lib/rodauth/rails/model.rb +1 -1
- data/lib/rodauth/rails/railtie.rb +4 -2
- data/lib/rodauth/rails/version.rb +1 -1
- data/lib/rodauth/rails.rb +14 -7
- data/rodauth-rails.gemspec +1 -1
- metadata +4 -20
- data/lib/generators/rodauth/templates/app/views/rodauth/_field.html.erb +0 -10
- data/lib/generators/rodauth/templates/app/views/rodauth/_field_error.html.erb +0 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_global_logout_field.html.erb +0 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_confirm_field.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_display.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_field.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_hidden_field.html.erb +0 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/_new_password_field.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_otp_auth_code_field.html.erb +0 -8
- data/lib/generators/rodauth/templates/app/views/rodauth/_password_confirm_field.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_password_field.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_code_field.html.erb +0 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_codes_form.html.erb +0 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/_sms_code_field.html.erb +0 -8
- data/lib/generators/rodauth/templates/app/views/rodauth/_sms_phone_field.html.erb +0 -8
- data/lib/generators/rodauth/templates/app/views/rodauth/_submit.html.erb +0 -3
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% content_for :title, rodauth.multi_phase_login_page_title %>
|
2
|
+
|
3
|
+
<%= render "login_form_header" %>
|
4
|
+
<%== rodauth.render_multi_phase_login_forms %>
|
5
|
+
<%= render "login_form_footer" %>
|
@@ -1,4 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.otp_auth_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.otp_auth_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.label "otp-auth-code", rodauth.otp_auth_label, class: "form-label" %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-sm-3">
|
8
|
+
<%= form.text_field rodauth.otp_auth_param, value: "", id: "otp-auth-code", autocomplete: "off", inputmode: "numeric", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.otp_auth_param)}", aria: ({ invalid: true, describedby: "otp-auth-code_error_message" } if rodauth.field_error(rodauth.otp_auth_param)) %>
|
9
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.otp_auth_param), class: "invalid-feedback", id: "otp-auth-code_error_message") if rodauth.field_error(rodauth.otp_auth_param) %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group mb-3">
|
15
|
+
<%= form.submit rodauth.otp_auth_button, class: "btn btn-primary" %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -1,4 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.otp_disable_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.otp_disable_path, method: :post do |form| %>
|
4
|
+
<% if rodauth.two_factor_modifications_require_password? %>
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
7
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
8
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<%= form.submit rodauth.otp_disable_button, class: "btn btn-warning" %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -1,23 +1,43 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% content_for :title, rodauth.otp_setup_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.otp_setup_path, method: :post do |form| %>
|
4
|
+
<%= form.hidden_field rodauth.otp_setup_param, value: rodauth.otp_user_key, id: "otp-key" %>
|
5
|
+
<%= form.hidden_field rodauth.otp_setup_raw_param, value: rodauth.otp_key, id: "otp-hmac-secret" if rodauth.otp_keys_use_hmac? %>
|
4
6
|
|
5
7
|
<div class="form-group mb-3">
|
6
|
-
<p
|
7
|
-
<p
|
8
|
+
<p><%= rodauth.otp_secret_label %>: <%= rodauth.otp_user_key %></p>
|
9
|
+
<p><%= rodauth.otp_provisioning_uri_label %>: <%= rodauth.otp_provisioning_uri %></p>
|
8
10
|
</div>
|
9
11
|
|
10
12
|
<div class="row">
|
11
13
|
<div class="col-lg-6 col-lg">
|
12
14
|
<div class="form-group mb-3">
|
13
|
-
<p
|
15
|
+
<p><%== rodauth.otp_qr_code %></p>
|
14
16
|
</div>
|
15
17
|
</div>
|
16
18
|
|
17
19
|
<div class="col-lg-6 col-lg">
|
18
|
-
|
19
|
-
|
20
|
-
|
20
|
+
<% if rodauth.two_factor_modifications_require_password? %>
|
21
|
+
<div class="form-group mb-3">
|
22
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
23
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
24
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<div class="form-group mb-3">
|
29
|
+
<%= form.label "otp-auth-code", rodauth.otp_auth_label, class: "form-label" %>
|
30
|
+
<div class="row">
|
31
|
+
<div class="col-sm-3">
|
32
|
+
<%= form.text_field rodauth.otp_auth_param, value: "", id: "otp-auth-code", autocomplete: "off", inputmode: "numeric", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.otp_auth_param)}", aria: ({ invalid: true, describedby: "otp-auth-code_error_message" } if rodauth.field_error(rodauth.otp_auth_param)) %>
|
33
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.otp_auth_param), class: "invalid-feedback", id: "otp-auth-code_error_message") if rodauth.field_error(rodauth.otp_auth_param) %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="form-group mb-3">
|
39
|
+
<%= form.submit rodauth.otp_setup_button, class: "btn btn-primary" %>
|
40
|
+
</div>
|
21
41
|
</div>
|
22
42
|
</div>
|
23
|
-
|
43
|
+
<% end %>
|
@@ -1,4 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.recovery_auth_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.recovery_auth_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.label "recovery-code", rodauth.recovery_codes_label, class: "form-label" %>
|
6
|
+
<%= form.text_field rodauth.recovery_codes_param, value: "", id: "recovery-code", autocomplete: "off", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.recovery_codes_param)}", aria: ({ invalid: true, describedby: "recovery-code_error_message" } if rodauth.field_error(rodauth.recovery_codes_param)) %>
|
7
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.recovery_codes_param), class: "invalid-feedback", id: "recovery-code_error_message") if rodauth.field_error(rodauth.recovery_codes_param) %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="form-group mb-3">
|
11
|
+
<%= form.submit rodauth.recovery_auth_button, class: "btn btn-primary" %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
@@ -1 +1,15 @@
|
|
1
|
-
|
1
|
+
<% content_for :title, rodauth.recovery_codes_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.recovery_codes_path, method: :post, data: { turbo: false } do |form| %>
|
4
|
+
<% if rodauth.two_factor_modifications_require_password? %>
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
7
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
8
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<%= form.submit rodauth.recovery_codes_button || rodauth.view_recovery_codes_button, name: (rodauth.add_recovery_codes_param if rodauth.recovery_codes_button), class: "btn btn-primary" %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -1,19 +1,24 @@
|
|
1
|
-
|
1
|
+
<% content_for :title, rodauth.remember_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.remember_path, method: :post do |form| %>
|
2
4
|
<fieldset class="form-group mb-3">
|
3
5
|
<div class="form-check">
|
4
|
-
|
5
|
-
|
6
|
+
<%= form.radio_button rodauth.remember_param, rodauth.remember_remember_param_value, id: "remember-remember", class: "form-check-input" %>
|
7
|
+
<%= form.label "remember-remember", rodauth.remember_remember_label, class: "form-check-label" %>
|
6
8
|
</div>
|
7
9
|
|
8
10
|
<div class="form-check">
|
9
|
-
|
10
|
-
|
11
|
+
<%= form.radio_button rodauth.remember_param, rodauth.remember_forget_param_value, id: "remember-forget", class: "form-check-input" %>
|
12
|
+
<%= form.label "remember-forget", rodauth.remember_forget_label, class: "form-check-label" %>
|
11
13
|
</div>
|
12
14
|
|
13
15
|
<div class="form-check">
|
14
|
-
|
15
|
-
|
16
|
+
<%= form.radio_button rodauth.remember_param, rodauth.remember_disable_param_value, id: "remember-disable", class: "form-check-input" %>
|
17
|
+
<%= form.label "remember-disable", rodauth.remember_disable_label, class: "form-check-label" %>
|
16
18
|
</div>
|
17
19
|
</fieldset>
|
18
|
-
|
19
|
-
|
20
|
+
|
21
|
+
<div class="form-group mb-3">
|
22
|
+
<%= form.submit rodauth.remember_button, class: "btn btn-primary" %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
@@ -1,5 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% content_for :title, rodauth.reset_password_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.reset_password_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
6
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
7
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<% if rodauth.require_password_confirmation? %>
|
11
|
+
<div class="form-group mb-3">
|
12
|
+
<%= form.label "password-confirm", rodauth.password_confirm_label, class: "form-label" %>
|
13
|
+
<%= form.password_field rodauth.password_confirm_param, value: "", id: "password-confirm", autocomplete: "new-password", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_confirm_param)}", aria: ({ invalid: true, describedby: "password-confirm_error_message" } if rodauth.field_error(rodauth.password_confirm_param)) %>
|
14
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_confirm_param), class: "invalid-feedback", id: "password-confirm_error_message") if rodauth.field_error(rodauth.password_confirm_param) %>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<div class="form-group mb-3">
|
19
|
+
<%= form.submit rodauth.reset_password_button, class: "btn btn-primary" %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -1,9 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<% content_for :title, rodauth.reset_password_request_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.reset_password_request_path, method: :post do |form| %>
|
4
|
+
<%== rodauth.reset_password_explanatory_text %>
|
5
|
+
|
6
|
+
<% if params[rodauth.login_param] && !rodauth.field_error(rodauth.login_param) %>
|
7
|
+
<%= form.hidden_field rodauth.login_param, value: params[rodauth.login_param] %>
|
8
|
+
<% else %>
|
9
|
+
<div class="form-group mb-3">
|
10
|
+
<%= form.label "login", rodauth.login_label, class: "form-label" %>
|
11
|
+
<%= form.email_field rodauth.login_param, value: params[rodauth.login_param], id: "login", autocomplete: "email", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.login_param)}", aria: ({ invalid: true, describedby: "login_error_message" } if rodauth.field_error(rodauth.login_param)) %>
|
12
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.login_param), class: "invalid-feedback", id: "login_error_message") if rodauth.field_error(rodauth.login_param) %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<div class="form-group mb-3">
|
17
|
+
<%= form.submit rodauth.reset_password_request_button, class: "btn btn-primary" %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
@@ -1,4 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.sms_auth_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.sms_auth_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.label "sms-code", rodauth.sms_code_label, class: "form-label" %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-sm-3">
|
8
|
+
<%= form.text_field rodauth.sms_code_param, value: "", id: "sms-code", autocomplete: "one-time-code", inputmode: "numeric", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.sms_code_param)}", aria: ({ invalid: true, describedby: "sms-code_error_message" } if rodauth.field_error(rodauth.sms_code_param)) %>
|
9
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.sms_code_param), class: "invalid-feedback", id: "sms-code_error_message") if rodauth.field_error(rodauth.sms_code_param) %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group mb-3">
|
15
|
+
<%= form.submit rodauth.sms_auth_button, class: "btn btn-primary" %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -1,4 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.sms_confirm_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.sms_confirm_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.label "sms-code", rodauth.sms_code_label, class: "form-label" %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-sm-3">
|
8
|
+
<%= form.text_field rodauth.sms_code_param, value: "", id: "sms-code", autocomplete: "one-time-code", inputmode: "numeric", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.sms_code_param)}", aria: ({ invalid: true, describedby: "sms-code_error_message" } if rodauth.field_error(rodauth.sms_code_param)) %>
|
9
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.sms_code_param), class: "invalid-feedback", id: "sms-code_error_message") if rodauth.field_error(rodauth.sms_code_param) %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group mb-3">
|
15
|
+
<%= form.submit rodauth.sms_confirm_button, class: "btn btn-primary" %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -1,4 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.sms_disable_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.sms_disable_path, method: :post do |form| %>
|
4
|
+
<% if rodauth.two_factor_modifications_require_password? %>
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
7
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
8
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<%= form.submit rodauth.sms_disable_button, class: "btn btn-primary" %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -1,3 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% content_for :title, rodauth.sms_request_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.sms_request_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.submit rodauth.sms_request_button, class: "btn btn-primary" %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
@@ -1,5 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% content_for :title, rodauth.sms_setup_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.sms_setup_path, method: :post do |form| %>
|
4
|
+
<% if rodauth.two_factor_modifications_require_password? %>
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
7
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
8
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<%= form.label "sms-phone", rodauth.sms_phone_label, class: "form-label" %>
|
14
|
+
<div class="row">
|
15
|
+
<div class="col-sm-3">
|
16
|
+
<%= form.telephone_field rodauth.sms_phone_param, value: "", id: "sms-phone", autocomplete: "tel", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.sms_phone_param)}", aria: ({ invalid: true, describedby: "sms-phone_error_message" } if rodauth.field_error(rodauth.sms_phone_param)) %>
|
17
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.sms_phone_param), class: "invalid-feedback", id: "sms-phone_error_message") if rodauth.field_error(rodauth.sms_phone_param) %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="form-group mb-3">
|
23
|
+
<%= form.submit rodauth.sms_setup_button, class: "btn btn-primary" %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
@@ -1,5 +1,7 @@
|
|
1
|
+
<% content_for :title, rodauth.two_factor_auth_page_title %>
|
2
|
+
|
1
3
|
<ul>
|
2
|
-
|
3
|
-
<li
|
4
|
-
|
4
|
+
<% rodauth.two_factor_auth_links.sort.each do |_, link, text| %>
|
5
|
+
<li><%= link_to text, link %></li>
|
6
|
+
<% end %>
|
5
7
|
</ul>
|
@@ -1,4 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :title, rodauth.two_factor_disable_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.two_factor_disable_path, method: :post do |form| %>
|
4
|
+
<% if rodauth.two_factor_modifications_require_password? %>
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
7
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
8
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<%= form.submit rodauth.two_factor_disable_button, class: "btn btn-primary" %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -1,22 +1,24 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% content_for :title, rodauth.two_factor_manage_page_title %>
|
2
|
+
|
3
|
+
<% if rodauth.two_factor_setup_links.any? %>
|
4
|
+
<%== rodauth.two_factor_setup_heading %>
|
3
5
|
|
4
6
|
<ul>
|
5
|
-
|
6
|
-
<li
|
7
|
-
|
7
|
+
<% rodauth.two_factor_setup_links.sort.each do |_, link, text| %>
|
8
|
+
<li><%= link_to text, link %></li>
|
9
|
+
<% end %>
|
8
10
|
</ul>
|
9
|
-
|
11
|
+
<% end %>
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
+
<% if rodauth.two_factor_remove_links.any? %>
|
14
|
+
<%== rodauth.two_factor_remove_heading %>
|
13
15
|
|
14
16
|
<ul>
|
15
|
-
|
16
|
-
<li
|
17
|
-
|
18
|
-
|
19
|
-
<li
|
20
|
-
|
17
|
+
<% rodauth.two_factor_remove_links.sort.each do |_, link, text| %>
|
18
|
+
<li><%= link_to text, link %></li>
|
19
|
+
<% end %>
|
20
|
+
<% if rodauth.two_factor_remove_links.length > 1 %>
|
21
|
+
<li><%= link_to rodauth.two_factor_disable_link_text, rodauth.two_factor_disable_path %></li>
|
22
|
+
<% end %>
|
21
23
|
</ul>
|
22
|
-
|
24
|
+
<% end %>
|
@@ -1,5 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% content_for :title, rodauth.unlock_account_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.unlock_account_path, method: :post do |form| %>
|
4
|
+
<%== rodauth.unlock_account_explanatory_text %>
|
5
|
+
|
6
|
+
<% if rodauth.unlock_account_requires_password? %>
|
7
|
+
<div class="form-group mb-3">
|
8
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
9
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
10
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="form-group mb-3">
|
15
|
+
<%= form.submit rodauth.unlock_account_button, class: "btn btn-primary" %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -1,5 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% content_for :title, rodauth.unlock_account_request_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.unlock_account_request_path, method: :post do |form| %>
|
4
|
+
<%= form.hidden_field rodauth.login_param, value: params[rodauth.login_param] %>
|
5
|
+
|
6
|
+
<%== rodauth.unlock_account_request_explanatory_text %>
|
7
|
+
|
8
|
+
<div class="form-group mb-3">
|
9
|
+
<%= form.submit rodauth.unlock_account_request_button, class: "btn btn-primary" %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
@@ -1,5 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% content_for :title, rodauth.verify_account_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.verify_account_path, method: :post do |form| %>
|
4
|
+
<% if rodauth.verify_account_set_password? %>
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<%= form.label "password", rodauth.password_label, class: "form-label" %>
|
7
|
+
<%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
|
8
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<% if rodauth.require_password_confirmation? %>
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<%= form.label "password-confirm", rodauth.password_confirm_label, class: "form-label" %>
|
14
|
+
<%= form.password_field rodauth.password_confirm_param, value: "", id: "password-confirm", autocomplete: "new-password", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_confirm_param)}", aria: ({ invalid: true, describedby: "password-confirm_error_message" } if rodauth.field_error(rodauth.password_confirm_param)) %>
|
15
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.password_confirm_param), class: "invalid-feedback", id: "password-confirm_error_message") if rodauth.field_error(rodauth.password_confirm_param) %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<div class="form-group mb-3">
|
21
|
+
<%= form.submit rodauth.verify_account_button, class: "btn btn-primary" %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
@@ -1,9 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<% content_for :title, rodauth.resend_verify_account_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.verify_account_resend_path, method: :post do |form| %>
|
4
|
+
<%== rodauth.verify_account_resend_explanatory_text %>
|
5
|
+
|
6
|
+
<% if params[rodauth.login_param] %>
|
7
|
+
<%= form.hidden_field rodauth.login_param, value: params[rodauth.login_param] %>
|
8
|
+
<% else %>
|
9
|
+
<div class="form-group mb-3">
|
10
|
+
<%= form.label "login", rodauth.login_label, class: "form-label" %>
|
11
|
+
<%= form.email_field rodauth.login_param, value: params[rodauth.login_param], id: "login", autocomplete: "email", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.login_param)}", aria: ({ invalid: true, describedby: "login_error_message" } if rodauth.field_error(rodauth.login_param)) %>
|
12
|
+
<%= content_tag(:span, rodauth.field_error(rodauth.login_param), class: "invalid-feedback", id: "login_error_message") if rodauth.field_error(rodauth.login_param) %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<div class="form-group mb-3">
|
17
|
+
<%= form.submit rodauth.verify_account_resend_button, class: "btn btn-primary" %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
@@ -1,3 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% content_for :title, rodauth.verify_login_change_page_title %>
|
2
|
+
|
3
|
+
<%= form_with url: rodauth.verify_login_change_path, method: :post do |form| %>
|
4
|
+
<div class="form-group mb-3">
|
5
|
+
<%= form.submit rodauth.verify_login_change_button, class: "btn btn-primary" %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
@@ -1,13 +1,17 @@
|
|
1
|
-
|
1
|
+
<% content_for :title, rodauth.webauthn_auth_page_title %>
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
<% cred = rodauth.webauth_credential_options_for_get %>
|
4
|
+
|
5
|
+
<%= form_with url: rodauth.webauthn_auth_form_path, method: :post, id: "webauthn-auth-form", data: { credential_options: cred.as_json.to_json } do |form| %>
|
6
|
+
<%= form.hidden_field rodauth.login_param, value: params[rodauth.login_param] %>
|
7
|
+
<%= form.hidden_field rodauth.webauthn_auth_challenge_param, value: cred.challenge %>
|
8
|
+
<%= form.hidden_field rodauth.webauthn_auth_challenge_hmac_param, value: rodauth.compute_hmac(cred.challenge) %>
|
9
|
+
<%= form.text_field rodauth.webauthn_auth_param, value: "", id: "webauthn-auth", aria: { hidden: "true" } %>
|
8
10
|
<div id="webauthn-auth-button">
|
9
|
-
|
11
|
+
<div class="form-group mb-3">
|
12
|
+
<%= form.submit rodauth.webauthn_auth_button, class: "btn btn-primary" %>
|
13
|
+
</div>
|
10
14
|
</div>
|
11
|
-
|
15
|
+
<% end %>
|
12
16
|
|
13
|
-
|
17
|
+
<%= javascript_include_tag rodauth.webauthn_auth_js_path %>
|