rodauth-rails 0.11.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -0
- data/README.md +316 -218
- data/lib/generators/rodauth/templates/app/lib/rodauth_app.rb +8 -4
- data/lib/generators/rodauth/templates/app/models/account.rb +1 -0
- data/lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/_field.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/_field_error.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/_global_logout_field.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_confirm_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_display.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_footer.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_header.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/_login_hidden_field.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/_new_password_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_otp_auth_code_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_password_confirm_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_password_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_code_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_codes_form.html.erb +4 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/_sms_code_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_sms_phone_field.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/_submit.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/add_recovery_codes.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb +4 -4
- data/lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/multi_phase_login.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb +9 -9
- data/lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb +5 -5
- data/lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_auth.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_manage.html.erb +6 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb +3 -3
- data/lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +2 -2
- data/lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +1 -1
- data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +7 -7
- data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +6 -6
- data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +7 -7
- data/lib/generators/rodauth/views_generator.rb +26 -4
- data/lib/rodauth/rails.rb +32 -13
- data/lib/rodauth/rails/auth.rb +9 -12
- data/lib/rodauth/rails/feature.rb +19 -230
- data/lib/rodauth/rails/feature/base.rb +62 -0
- data/lib/rodauth/rails/feature/callbacks.rb +65 -0
- data/lib/rodauth/rails/feature/csrf.rb +65 -0
- data/lib/rodauth/rails/feature/email.rb +30 -0
- data/lib/rodauth/rails/feature/instrumentation.rb +71 -0
- data/lib/rodauth/rails/feature/internal_request.rb +50 -0
- data/lib/rodauth/rails/feature/render.rb +48 -0
- data/lib/rodauth/rails/model.rb +101 -0
- data/lib/rodauth/rails/model/associations.rb +195 -0
- data/lib/rodauth/rails/railtie.rb +0 -5
- data/lib/rodauth/rails/tasks.rake +5 -5
- data/lib/rodauth/rails/version.rb +1 -1
- data/rodauth-rails.gemspec +4 -1
- metadata +56 -6
- data/lib/rodauth/rails/log_subscriber.rb +0 -34
@@ -154,11 +154,15 @@ class RodauthApp < Rodauth::Rails::App
|
|
154
154
|
<% end -%>
|
155
155
|
end
|
156
156
|
|
157
|
-
# ==>
|
157
|
+
# ==> Secondary configurations
|
158
158
|
# configure(:admin) do
|
159
|
-
#
|
159
|
+
# # ... enable features ...
|
160
160
|
# prefix "/admin"
|
161
161
|
# session_key_prefix "admin_"
|
162
|
+
# # remember_cookie_key "_admin_remember" # if using remember feature
|
163
|
+
#
|
164
|
+
# # search views in `app/views/admin/rodauth` directory
|
165
|
+
# rails_controller { Admin::RodauthController }
|
162
166
|
# end
|
163
167
|
|
164
168
|
route do |r|
|
@@ -180,7 +184,7 @@ class RodauthApp < Rodauth::Rails::App
|
|
180
184
|
# rodauth.require_authentication
|
181
185
|
# end
|
182
186
|
|
183
|
-
# ==>
|
187
|
+
# ==> Secondary configurations
|
184
188
|
# r.on "admin" do
|
185
189
|
# r.rodauth(:admin)
|
186
190
|
#
|
@@ -188,7 +192,7 @@ class RodauthApp < Rodauth::Rails::App
|
|
188
192
|
# rodauth(:admin).require_http_basic_auth
|
189
193
|
# end
|
190
194
|
#
|
191
|
-
#
|
195
|
+
# break # allow the Rails app to handle other "/admin/*" requests
|
192
196
|
# end
|
193
197
|
end
|
194
198
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
autocomplete: local_assigns[:autocomplete],
|
5
5
|
inputmode: local_assigns[:inputmode],
|
6
6
|
required: local_assigns[:required] != false,
|
7
|
-
class: "#{local_assigns[:class] || "form-control"} #{"is-invalid" if rodauth
|
8
|
-
aria: ({ invalid: "true", describedby: "#{name}_error_message" } if rodauth
|
7
|
+
class: "#{local_assigns[:class] || "form-control"} #{"is-invalid" if <%= rodauth %>.field_error(name)}",
|
8
|
+
aria: ({ invalid: "true", describedby: "#{name}_error_message" } if <%= rodauth %>.field_error(name)) %>
|
9
9
|
|
10
10
|
<%%= render "field_error", name: name unless local_assigns[:skip_error_message] %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%% if rodauth
|
2
|
-
<div class="invalid-feedback" id="<%%= name %>_error_message"><%%= rodauth
|
1
|
+
<%% if <%= rodauth %>.field_error(name) %>
|
2
|
+
<div class="invalid-feedback" id="<%%= name %>_error_message"><%%= <%= rodauth %>.field_error(name) %></div>
|
3
3
|
<%% end %>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<div class="form-group">
|
1
|
+
<div class="form-group mb-3">
|
2
2
|
<div class="form-check">
|
3
|
-
<%%= check_box_tag rodauth
|
3
|
+
<%%= check_box_tag <%= rodauth %>.global_logout_param, "t", false, id: "global-logout", class: "form-check-input" %>
|
4
4
|
<%%= label_tag "global-logout", "Logout all Logged In Sessons?", class: "form-check-label" %>
|
5
5
|
</div>
|
6
6
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "login-confirm", "Confirm Login" %>
|
3
|
-
<%%= render "field", name: rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "login-confirm", "Confirm Login", class: "form-label" %>
|
3
|
+
<%%= render "field", name: <%= rodauth %>.login_confirm_param, id: "login-confirm", type: :email, autocomplete: "email" %>
|
4
4
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "login", "Login" %>
|
3
|
-
<%%= email_field_tag rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "login", "Login", class: "form-label" %>
|
3
|
+
<%%= email_field_tag <%= rodauth %>.login_param, params[<%= rodauth %>.login_param], id: "login", readonly: true, class: "form-control-plaintext" %>
|
4
4
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "login", "Login" %>
|
3
|
-
<%%= render "field", name: rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "login", "Login", class: "form-label" %>
|
3
|
+
<%%= render "field", name: <%= rodauth %>.login_param, id: "login", type: :email, autocomplete: "email" %>
|
4
4
|
</div>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%% if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.login_path, method: :post do %>
|
2
|
+
<%% if <%= rodauth %>.skip_login_field_on_login? %>
|
3
3
|
<%%= render "login_display" %>
|
4
4
|
<%% else %>
|
5
5
|
<%%= render "login_field" %>
|
6
6
|
<%% end %>
|
7
|
-
<%%= render "password_field" unless rodauth
|
7
|
+
<%%= render "password_field" unless <%= rodauth %>.skip_password_field_on_login? %>
|
8
8
|
<%%= render "submit", value: "Login" %>
|
9
9
|
<%% end %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%% unless rodauth
|
1
|
+
<%% unless <%= rodauth %>.login_form_footer_links.empty? %>
|
2
2
|
<h2>Other Options</h2>
|
3
3
|
<ul>
|
4
|
-
<%% rodauth
|
4
|
+
<%% <%= rodauth %>.login_form_footer_links.sort.each do |_, link, text| %>
|
5
5
|
<li><%%= link_to text, link %></li>
|
6
6
|
<%% end %>
|
7
7
|
</ul>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%% if rodauth
|
2
|
-
<%%= render template: "<%=
|
1
|
+
<%% if <%= rodauth %>.field_error("password") && <%= rodauth %>.features.include?(:reset_password) %>
|
2
|
+
<%%= render template: "<%= directory %>/reset_password_request", layout: false %>
|
3
3
|
<%% end %>
|
@@ -1 +1 @@
|
|
1
|
-
<%%= hidden_field_tag rodauth
|
1
|
+
<%%= hidden_field_tag <%= rodauth %>.login_param, params[<%= rodauth %>.login_param] %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "new-password", "New Password" %>
|
3
|
-
<%%= render "field", name: rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "new-password", "New Password", class: "form-label" %>
|
3
|
+
<%%= render "field", name: <%= rodauth %>.new_password_param, id: "new-password", type: "password", value: "", autocomplete: "new-password" %>
|
4
4
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "otp-auth-code", "Authentication Code" %>
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "otp-auth-code", "Authentication Code", class: "form-label" %>
|
3
3
|
<div class="row">
|
4
4
|
<div class="col-sm-3">
|
5
|
-
<%%= render "field", name: rodauth
|
5
|
+
<%%= render "field", name: <%= rodauth %>.otp_auth_param, id: "otp-auth-code", value: "", autocomplete: "off", inputmode: "numeric" %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "password-confirm", "Confirm Password" %>
|
3
|
-
<%%= render "field", name: rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "password-confirm", "Confirm Password", class: "form-label" %>
|
3
|
+
<%%= render "field", name: <%= rodauth %>.password_confirm_param, id: "password-confirm", type: :password, value: "", autocomplete: "new-password" %>
|
4
4
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "password", "Password" %>
|
3
|
-
<%%= render "field", name: rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "password", "Password", class: "form-label" %>
|
3
|
+
<%%= render "field", name: <%= rodauth %>.password_param, id: "password", type: :password, value: "", autocomplete: <%= rodauth %>.password_field_autocomplete_value %>
|
4
4
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "recovery_code", "Recovery Code" %>
|
3
|
-
<%%= render "field", name: rodauth
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "recovery_code", "Recovery Code", class: "form-label" %>
|
3
|
+
<%%= render "field", name: <%= rodauth %>.recovery_codes_param, id: "recovery_code", value: "", autocomplete: "off" %>
|
4
4
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= render "password_field" if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.recovery_codes_path, method: :post do %>
|
2
|
+
<%%= render "password_field" if <%= rodauth %>.two_factor_modifications_require_password? %>
|
3
3
|
<%%= render "submit",
|
4
|
-
value: rodauth
|
5
|
-
name: (rodauth
|
4
|
+
value: <%= rodauth %>.recovery_codes_button || "View Authentication Recovery Codes",
|
5
|
+
name: (<%= rodauth %>.add_recovery_codes_param if <%= rodauth %>.recovery_codes_button) %>
|
6
6
|
<%% end %>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "sms-code", "SMS Code" %>
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "sms-code", "SMS Code", class: "form-label" %>
|
3
3
|
<div class="row">
|
4
4
|
<div class="col-sm-3">
|
5
|
-
<%%= render "field", name: rodauth
|
5
|
+
<%%= render "field", name: <%= rodauth %>.sms_code_param, id: "sms-code", value: "", autocomplete: "one-time-code", inputmode: "numeric" %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<div class="form-group">
|
2
|
-
<%%= label_tag "sms-phone", "Phone Number" %>
|
1
|
+
<div class="form-group mb-3">
|
2
|
+
<%%= label_tag "sms-phone", "Phone Number", class: "form-label" %>
|
3
3
|
<div class="row">
|
4
4
|
<div class="col-sm-3">
|
5
|
-
<%%= render "field", name: rodauth
|
5
|
+
<%%= render "field", name: <%= rodauth %>.sms_phone_param, id: "sms-phone", type: :tel, autocomplete: "tel" %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<pre id="recovery-codes"><%%= rodauth
|
1
|
+
<pre id="recovery-codes"><%%= <%= rodauth %>.recovery_codes.map { |s| h(s) }.join("\n\n") %></pre>
|
2
2
|
|
3
|
-
<%% if rodauth
|
3
|
+
<%% if <%= rodauth %>.can_add_recovery_codes? %>
|
4
4
|
<h2>Add Additional Recovery Codes</h2>
|
5
5
|
<%%= render "recovery_codes_form" %>
|
6
6
|
<%% end %>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%%= form_tag rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.change_login_path, method: :post do %>
|
2
2
|
<%%= render "login_field" %>
|
3
|
-
<%%= render "login_confirm_field" if rodauth
|
4
|
-
<%%= render "password_field" if rodauth
|
3
|
+
<%%= render "login_confirm_field" if <%= rodauth %>.require_login_confirmation? %>
|
4
|
+
<%%= render "password_field" if <%= rodauth %>.change_login_requires_password? %>
|
5
5
|
<%%= render "submit", value: "Change Login" %>
|
6
6
|
<%% end %>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= render "password_field" if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.change_password_path, method: :post do %>
|
2
|
+
<%%= render "password_field" if <%= rodauth %>.change_password_requires_password? %>
|
3
3
|
<%%= render "new_password_field" %>
|
4
|
-
<%%= render "password_confirm_field" if rodauth
|
4
|
+
<%%= render "password_confirm_field" if <%= rodauth %>.require_password_confirmation? %>
|
5
5
|
<%%= render "submit", value: "Change Password" %>
|
6
6
|
<%% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= render "password_field" if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.close_account_path, method: :post do %>
|
2
|
+
<%%= render "password_field" if <%= rodauth %>.close_account_requires_password? %>
|
3
3
|
<%%= render "submit", value: "Close Account", class: "btn btn-danger" %>
|
4
4
|
<%% end %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%%= form_tag rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.create_account_path, method: :post do %>
|
2
2
|
<%%= render "login_field" %>
|
3
|
-
<%%= render "login_confirm_field" if rodauth
|
4
|
-
<%%= render "password_field" if rodauth
|
5
|
-
<%%= render "password_confirm_field" if rodauth
|
3
|
+
<%%= render "login_confirm_field" if <%= rodauth %>.require_login_confirmation? %>
|
4
|
+
<%%= render "password_field" if <%= rodauth %>.create_account_set_password? %>
|
5
|
+
<%%= render "password_confirm_field" if <%= rodauth %>.create_account_set_password? && <%= rodauth %>.require_password_confirmation? %>
|
6
6
|
<%%= render "submit", value: "Create Account" %>
|
7
7
|
<%% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= render "global_logout_field" if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.logout_path, method: :post do %>
|
2
|
+
<%%= render "global_logout_field" if <%= rodauth %>.features.include?(:active_sessions) %>
|
3
3
|
<%%= render "submit", value: "Logout", class: "btn btn-warning" %>
|
4
4
|
<%% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= render "password_field" if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.otp_disable_path, method: :post do %>
|
2
|
+
<%%= render "password_field" if <%= rodauth %>.two_factor_modifications_require_password? %>
|
3
3
|
<%%= render "submit", value: "Disable TOTP Authentication", class: "btn btn-warning" %>
|
4
4
|
<%% end %>
|
@@ -1,21 +1,21 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= hidden_field_tag rodauth
|
3
|
-
<%%= hidden_field_tag rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.otp_setup_path, method: :post do %>
|
2
|
+
<%%= hidden_field_tag <%= rodauth %>.otp_setup_param, <%= rodauth %>.otp_user_key, id: "otp-key" %>
|
3
|
+
<%%= hidden_field_tag <%= rodauth %>.otp_setup_raw_param, <%= rodauth %>.otp_key, id: "otp-hmac-secret" if <%= rodauth %>.otp_keys_use_hmac? %>
|
4
4
|
|
5
|
-
<div class="form-group">
|
6
|
-
<p>Secret: <%%= rodauth
|
7
|
-
<p>Provisioning URL: <%%= rodauth
|
5
|
+
<div class="form-group mb-3">
|
6
|
+
<p>Secret: <%%= <%= rodauth %>.otp_user_key %></p>
|
7
|
+
<p>Provisioning URL: <%%= <%= rodauth %>.otp_provisioning_uri %></p>
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<div class="row">
|
11
11
|
<div class="col-lg-6 col-lg">
|
12
|
-
<div class="form-group">
|
13
|
-
<p><%%= rodauth
|
12
|
+
<div class="form-group mb-3">
|
13
|
+
<p><%%= <%= rodauth %>.otp_qr_code.html_safe %></p>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="col-lg-6 col-lg">
|
18
|
-
<%%= render "password_field" if rodauth
|
18
|
+
<%%= render "password_field" if <%= rodauth %>.two_factor_modifications_require_password? %>
|
19
19
|
<%%= render "otp_auth_code_field" %>
|
20
20
|
<%%= render "submit", value: "Setup TOTP Authentication" %>
|
21
21
|
</div>
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<fieldset class="form-group">
|
1
|
+
<%%= form_tag <%= rodauth %>.remember_path, method: :post do %>
|
2
|
+
<fieldset class="form-group mb-3">
|
3
3
|
<div class="form-check">
|
4
|
-
<%%= radio_button_tag rodauth
|
4
|
+
<%%= radio_button_tag <%= rodauth %>.remember_param, <%= rodauth %>.remember_remember_param_value, false, id: "remember-remember", class: "form-check-input" %>
|
5
5
|
<%%= label_tag "remember-remember", "Remember Me", class: "form-check-label" %>
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<div class="form-check">
|
9
|
-
<%%= radio_button_tag rodauth
|
9
|
+
<%%= radio_button_tag <%= rodauth %>.remember_param, <%= rodauth %>.remember_forget_param_value, false, id: "remember-forget", class: "form-check-input" %>
|
10
10
|
<%%= label_tag "remember-forget", "Forget Me", class: "form-check-label" %>
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div class="form-check">
|
14
|
-
<%%= radio_button_tag rodauth
|
14
|
+
<%%= radio_button_tag <%= rodauth %>.remember_param, <%= rodauth %>.remember_disable_param_value, false, id: "remember-disable", class: "form-check-input" %>
|
15
15
|
<%%= label_tag "remember-disable", "Disable Remember Me", class: "form-check-label" %>
|
16
16
|
</div>
|
17
17
|
</fieldset>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%%= form_tag rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.reset_password_path, method: :post do %>
|
2
2
|
<%%= render "password_field" %>
|
3
|
-
<%%= render "password_confirm_field" if rodauth
|
3
|
+
<%%= render "password_confirm_field" if <%= rodauth %>.require_password_confirmation? %>
|
4
4
|
<%%= render "submit", value: "Reset Password" %>
|
5
5
|
<%% end %>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%%= form_tag rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.reset_password_request_path, method: :post do %>
|
2
2
|
<p>If you have forgotten your password, you can request a password reset:</p>
|
3
|
-
<%% if params[rodauth
|
3
|
+
<%% if params[<%= rodauth %>.login_param] && !<%= rodauth %>.field_error(<%= rodauth %>.login_param) %>
|
4
4
|
<%%= render "login_hidden_field" %>
|
5
5
|
<%% else %>
|
6
6
|
<%%= render "login_field" %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%%= form_tag rodauth
|
2
|
-
<%%= render "password_field" if rodauth
|
1
|
+
<%%= form_tag <%= rodauth %>.sms_disable_path, method: :post do %>
|
2
|
+
<%%= render "password_field" if <%= rodauth %>.two_factor_modifications_require_password? %>
|
3
3
|
<%%= render "submit", value: "Disable Backup SMS Authentication" %>
|
4
4
|
<%% end %>
|