rodauth-rails 0.1.0 → 0.1.1

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +4 -0
  3. data/lib/generators/rodauth/templates/app/views/rodauth/_field.html.erb +10 -0
  4. data/lib/generators/rodauth/templates/app/views/rodauth/_field_error.html.erb +3 -0
  5. data/lib/generators/rodauth/templates/app/views/rodauth/_global_logout_field.html.erb +6 -0
  6. data/lib/generators/rodauth/templates/app/views/rodauth/_login_confirm_field.html.erb +4 -0
  7. data/lib/generators/rodauth/templates/app/views/rodauth/_login_display.html.erb +4 -0
  8. data/lib/generators/rodauth/templates/app/views/rodauth/_login_field.html.erb +4 -0
  9. data/lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb +9 -0
  10. data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_footer.html.erb +23 -0
  11. data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_header.html.erb +3 -0
  12. data/lib/generators/rodauth/templates/app/views/rodauth/_login_hidden_field.html.erb +1 -0
  13. data/lib/generators/rodauth/templates/app/views/rodauth/_new_password_field.html.erb +4 -0
  14. data/lib/generators/rodauth/templates/app/views/rodauth/_otp_auth_code_field.html.erb +8 -0
  15. data/lib/generators/rodauth/templates/app/views/rodauth/_password_confirm_field.html.erb +4 -0
  16. data/lib/generators/rodauth/templates/app/views/rodauth/_password_field.html.erb +4 -0
  17. data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_code_field.html.erb +4 -0
  18. data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_codes_form.html.erb +6 -0
  19. data/lib/generators/rodauth/templates/app/views/rodauth/_sms_code_field.html.erb +8 -0
  20. data/lib/generators/rodauth/templates/app/views/rodauth/_sms_phone_field.html.erb +8 -0
  21. data/lib/generators/rodauth/templates/app/views/rodauth/_submit.html.erb +3 -0
  22. data/lib/generators/rodauth/templates/app/views/rodauth/add_recovery_codes.html.erb +6 -0
  23. data/lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb +6 -0
  24. data/lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb +6 -0
  25. data/lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb +4 -0
  26. data/lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb +4 -0
  27. data/lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb +7 -0
  28. data/lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb +3 -0
  29. data/lib/generators/rodauth/templates/app/views/rodauth/login.html.erb +3 -0
  30. data/lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb +6 -0
  31. data/lib/generators/rodauth/templates/app/views/rodauth/multi_phase_login.html.erb +3 -0
  32. data/lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb +13 -0
  33. data/lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb +4 -0
  34. data/lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb +23 -0
  35. data/lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +4 -0
  36. data/lib/generators/rodauth/templates/app/views/rodauth/recovery_codes.html.erb +1 -0
  37. data/lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb +19 -0
  38. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb +5 -0
  39. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +9 -0
  40. data/lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb +4 -0
  41. data/lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +4 -0
  42. data/lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb +4 -0
  43. data/lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb +3 -0
  44. data/lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb +5 -0
  45. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_auth.html.erb +5 -0
  46. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +4 -0
  47. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_manage.html.erb +22 -0
  48. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb +5 -0
  49. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +5 -0
  50. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb +5 -0
  51. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +9 -0
  52. data/lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +3 -0
  53. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +13 -0
  54. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +13 -0
  55. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +13 -0
  56. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/email_auth.text.erb +5 -0
  57. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/password_changed.text.erb +2 -0
  58. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/reset_password.text.erb +5 -0
  59. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/unlock_account.text.erb +5 -0
  60. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_account.text.erb +4 -0
  61. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_login_change.text.erb +10 -0
  62. data/rodauth-rails.gemspec +2 -2
  63. metadata +62 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d146993e77acfbe027e5cfe399cc13cfe16d2e967d73b0caf149c1363a222b9b
4
- data.tar.gz: f77401bec1bfabd12cb87285e3e6a42b9b7ca7bf0fb986a32b27babba7d49d72
3
+ metadata.gz: 208b7da31e6d8a4949d5059480e60a8302e7847ec253c8cfbd0c3e0f9e7b4d93
4
+ data.tar.gz: 364bb8b379717f2cb4879a07fec5505f5769bb17f78ddbc14b6a5f7e26189016
5
5
  SHA512:
6
- metadata.gz: 7592679984260110c5cd702601d9c9841fc5c5e8980790aad8bb223997851d06c43045361a91ab7ad6c7bb0b113a79bd52e26e5de3a488e7269cf1e3bdf2ecaa
7
- data.tar.gz: 70fa3b31cffff7cecb98cf2951a35bd2dd4f6ca65cd4d9b49494d94be0858e73aa5d292d2292053d1b847921f05212b8c8d3b0b2ffd81aed4e191916749d4249
6
+ metadata.gz: 41f7d004e425622098c5a0dbc60f7d35b45e323f37e947dc34d20091c411d4a1908af2a1b9f10531a12c939b6532a60b688b7fc9369ef40b20a3579d7df77b84
7
+ data.tar.gz: 2a76e9f356208a235a86406adc51b952803f1beebc3ee42c4d7da1c8eab8855840bc3311b8e31ea052447b5b693bdbc5c5f59565f10aae614a4b4eaede1f82a0
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.email_auth_request_path, method: :post do %>
2
+ <%%= render "login_hidden_field" %>
3
+ <%%= render "submit", value: "Send Login Link Via Email" %>
4
+ <%% end %>
@@ -0,0 +1,10 @@
1
+ <%%= text_field_tag name, local_assigns[:value] || params[name],
2
+ type: local_assigns[:type] || "text",
3
+ id: local_assigns[:id],
4
+ autocomplete: local_assigns[:autocomplete],
5
+ inputmode: local_assigns[:inputmode],
6
+ required: local_assigns[:required] != false,
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
+
10
+ <%%= render "field_error", name: name unless local_assigns[:skip_error_message] %>
@@ -0,0 +1,3 @@
1
+ <%% if rodauth.field_error(name) %>
2
+ <div class="invalid-feedback" id="<%%= name %>_error_message"><%%= rodauth.field_error(name) %></div>
3
+ <%% end %>
@@ -0,0 +1,6 @@
1
+ <div class="form-group">
2
+ <div class="form-check">
3
+ <%%= check_box_tag rodauth.global_logout_param, "t", false, id: "global-logout", class: "form-check-input" %>
4
+ <%%= label_tag "global-logout", "Logout all Logged In Sessons?", class: "form-check-label" %>
5
+ </div>
6
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "login-confirm", "Confirm Login" %>
3
+ <%%= render "field", name: rodauth.login_confirm_param, id: "login-confirm", type: :email, autocomplete: "email" %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "login", "Login" %>
3
+ <%%= email_field_tag rodauth.login_param, params[rodauth.login_param], id: "login", readonly: true, class: "form-control-plaintext" %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "login", "Login" %>
3
+ <%%= render "field", name: rodauth.login_param, id: "login", type: :email, autocomplete: "email" %>
4
+ </div>
@@ -0,0 +1,9 @@
1
+ <%%= form_tag rodauth.login_path, method: :post do %>
2
+ <%% if rodauth.skip_login_field_on_login? %>
3
+ <%%= render "login_display" %>
4
+ <%% else %>
5
+ <%%= render "login_field" %>
6
+ <%% end %>
7
+ <%%= render "password_field" unless rodauth.skip_password_field_on_login? %>
8
+ <%%= render "submit", value: "Login" %>
9
+ <%% end %>
@@ -0,0 +1,23 @@
1
+ <% if Rodauth::MAJOR == 2 -%>
2
+ <%% unless rodauth.login_form_footer_links.empty? %>
3
+ <h2>Other Options</h2>
4
+ <ul>
5
+ <%% rodauth.login_form_footer_links.sort.each do |_, link, text| %>
6
+ <li><%%= link_to text, link %></li>
7
+ <%% end %>
8
+ </ul>
9
+ <%% end %>
10
+ <% else -%>
11
+ <%% if rodauth.features.include?(:create_account) %>
12
+ <p><%%= link_to "Create a New Account", rodauth.create_account_path %></p>
13
+ <%% end %>
14
+ <%% if rodauth.features.include?(:reset_password) %>
15
+ <p><%%= link_to "Forgot Password?", rodauth.reset_password_request_path %></p>
16
+ <%% end %>
17
+ <%% if rodauth.features.include?(:email_auth) && rodauth.valid_login_entered? %>
18
+ <%%= render "email_auth_request_form" %>
19
+ <%% end %>
20
+ <%% if rodauth.features.include?(:verify_account) %>
21
+ <p><%%= link_to "Resend Verify Account Information", rodauth.verify_account_resend_path %></p>
22
+ <%% end %>
23
+ <% end -%>
@@ -0,0 +1,3 @@
1
+ <%% if rodauth.field_error("password") && rodauth.features.include?(:reset_password) %>
2
+ <%%= render template: "<%= options[:directory] %>/reset_password_request", layout: false %>
3
+ <%% end %>
@@ -0,0 +1 @@
1
+ <%%= hidden_field_tag rodauth.login_param, params[rodauth.login_param] %>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "new-password", "New Password" %>
3
+ <%%= render "field", name: rodauth.new_password_param, id: "new-password", type: "password", value: "", autocomplete: "new-password" %>
4
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "otp-auth-code", "Authentication Code" %>
3
+ <div class="row">
4
+ <div class="col-sm-3">
5
+ <%%= render "field", name: rodauth.otp_auth_param, id: "otp-auth-code", value: "", autocomplete: "off", inputmode: "numeric" %>
6
+ </div>
7
+ </div>
8
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "password-confirm", "Confirm Password" %>
3
+ <%%= render "field", name: rodauth.password_confirm_param, id: "password-confirm", type: :password, value: "", autocomplete: "new-password" %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "password", "Password" %>
3
+ <%%= render "field", name: rodauth.password_param, id: "password", type: :password, value: "", autocomplete: "current-password" %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "recovery_code", "Recovery Code" %>
3
+ <%%= render "field", name: rodauth.recovery_codes_param, id: "recovery_code", value: "", autocomplete: "off" %>
4
+ </div>
@@ -0,0 +1,6 @@
1
+ <%%= form_tag rodauth.recovery_codes_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
3
+ <%%= render "submit",
4
+ value: rodauth.recovery_codes_button || "View Authentication Recovery Codes",
5
+ name: (rodauth.add_recovery_codes_param if rodauth.recovery_codes_button) %>
6
+ <%% end %>
@@ -0,0 +1,8 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "sms-code", "SMS Code" %>
3
+ <div class="row">
4
+ <div class="col-sm-3">
5
+ <%%= render "field", name: rodauth.sms_code_param, id: "sms-code", value: "", autocomplete: "one-time-code", inputmode: "numeric" %>
6
+ </div>
7
+ </div>
8
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="form-group">
2
+ <%%= label_tag "sms-phone", "Phone Number" %>
3
+ <div class="row">
4
+ <div class="col-sm-3">
5
+ <%%= render "field", name: rodauth.sms_phone_param, id: "sms-phone", type: :tel, autocomplete: "tel" %>
6
+ </div>
7
+ </div>
8
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="form-group">
2
+ <%%= submit_tag local_assigns[:value], name: local_assigns[:name], class: local_assigns[:class] || "btn btn-primary" %>
3
+ </div>
@@ -0,0 +1,6 @@
1
+ <pre id="recovery-codes"><%%= rodauth.recovery_codes.map { |s| h(s) }.join("\n\n") %></pre>
2
+
3
+ <%% if rodauth.can_add_recovery_codes? %>
4
+ <h2>Add Additional Recovery Codes</h2>
5
+ <%%= render "recovery_codes_form" %>
6
+ <%% end %>
@@ -0,0 +1,6 @@
1
+ <%%= form_tag rodauth.change_login_path, method: :post do %>
2
+ <%%= render "login_field" %>
3
+ <%%= render "login_confirm_field" if rodauth.require_login_confirmation? %>
4
+ <%%= render "password_field" if rodauth.change_login_requires_password? %>
5
+ <%%= render "submit", value: "Change Login" %>
6
+ <%% end %>
@@ -0,0 +1,6 @@
1
+ <%%= form_tag rodauth.change_password_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.change_password_requires_password? %>
3
+ <%%= render "new_password_field" %>
4
+ <%%= render "password_confirm_field" if rodauth.require_password_confirmation? %>
5
+ <%%= render "submit", value: "Change Password" %>
6
+ <%% end %>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.close_account_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.close_account_requires_password? %>
3
+ <%%= render "submit", value: "Close Account", class: "btn btn-danger" %>
4
+ <%% end %>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.confirm_password_path, method: :post do %>
2
+ <%%= render "password_field" %>
3
+ <%%= render "submit", value: "Confirm Password" %>
4
+ <%% end %>
@@ -0,0 +1,7 @@
1
+ <%%= form_tag rodauth.create_account_path, method: :post do %>
2
+ <%%= render "login_field" %>
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
+ <%%= render "submit", value: "Create Account" %>
7
+ <%% end %>
@@ -0,0 +1,3 @@
1
+ <%%= form_tag rodauth.email_auth_path, method: :post do %>
2
+ <%%= render "submit", value: "Login" %>
3
+ <%% end %>
@@ -0,0 +1,3 @@
1
+ <%%= render "login_form_header" %>
2
+ <%%= render "login_form" %>
3
+ <%%= render "login_form_footer" %>
@@ -0,0 +1,6 @@
1
+ <%%= form_tag rodauth.logout_path, method: :post do %>
2
+ <% if Rodauth::MAJOR == 2 -%>
3
+ <%%= render "global_logout_field" if rodauth.features.include?(:active_sessions) %>
4
+ <% end -%>
5
+ <%%= render "submit", value: "Logout", class: "btn btn-warning" %>
6
+ <%% end %>
@@ -0,0 +1,3 @@
1
+ <%%= render "login_form_header" %>
2
+ <%%= rodauth.render_multi_phase_login_forms.html_safe %>
3
+ <%%= render "login_form_footer" %>
@@ -0,0 +1,13 @@
1
+ <%%= form_tag rodauth.otp_auth_path, method: :post do %>
2
+ <%%= render "otp_auth_code_field" %>
3
+ <%%= render "submit", value: "Authenticate Using TOTP" %>
4
+ <%% end %>
5
+ <% if Rodauth::MAJOR == 1 -%>
6
+
7
+ <%% if rodauth.features.include?(:sms_codes) && rodauth.sms_available? %>
8
+ <p><%%= link_to "Authenticate using SMS code", rodauth.sms_request_path %></p>
9
+ <%% end %>
10
+ <%% if rodauth.features.include?(:recovery_codes) %>
11
+ <p><%%= link_to "Authenticate using recovery code", rodauth.recovery_auth_path %></p>
12
+ <%% end %>
13
+ <% end -%>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.otp_disable_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
3
+ <%%= render "submit", value: "Disable TOTP Authentication", class: "btn btn-warning" %>
4
+ <%% end %>
@@ -0,0 +1,23 @@
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
+
5
+ <div class="form-group">
6
+ <p>Secret: <%%= rodauth.otp_user_key %></p>
7
+ <p>Provisioning URL: <%%= rodauth.otp_provisioning_uri %></p>
8
+ </div>
9
+
10
+ <div class="row">
11
+ <div class="col-lg-6 col-lg">
12
+ <div class="form-group">
13
+ <p><%%= rodauth.otp_qr_code.html_safe %></p>
14
+ </div>
15
+ </div>
16
+
17
+ <div class="col-lg-6 col-lg">
18
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
19
+ <%%= render "otp_auth_code_field" %>
20
+ <%%= render "submit", value: "Setup TOTP Authentication" %>
21
+ </div>
22
+ </div>
23
+ <%% end %>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.recovery_auth_path, method: :post do %>
2
+ <%%= render "recovery_code_field" %>
3
+ <%%= render "submit", value: "Authenticate via Recovery Code" %>
4
+ <%% end %>
@@ -0,0 +1 @@
1
+ <%%= render "recovery_codes_form" %>
@@ -0,0 +1,19 @@
1
+ <%%= form_tag rodauth.remember_path, method: :post do %>
2
+ <fieldset class="form-group">
3
+ <div class="form-check">
4
+ <%%= radio_button_tag rodauth.remember_param, rodauth.remember_remember_param_value, false, id: "remember-remember", class: "form-check-input" %>
5
+ <%%= label_tag "remember-remember", "Remember Me", class: "form-check-label" %>
6
+ </div>
7
+
8
+ <div class="form-check">
9
+ <%%= radio_button_tag rodauth.remember_param, rodauth.rememember_forget_param_value, false, id: "remember-forget", class: "form-check-input" %>
10
+ <%%= label_tag "remember-forget", "Forget Me", class: "form-check-label" %>
11
+ </div>
12
+
13
+ <div class="form-check">
14
+ <%%= radio_button_tag rodauth.remember_param, rodauth.remember_disable_param_value, false, id: "remember-disable", class: "form-check-input" %>
15
+ <%%= label_tag "remember-disable", "Disable Remember Me", class: "form-check-label" %>
16
+ </div>
17
+ </fieldset>
18
+ <%%= render "submit", value: "Change Remember Setting" %>
19
+ <%% end %>
@@ -0,0 +1,5 @@
1
+ <%%= form_tag rodauth.reset_password_path, method: :post do %>
2
+ <%%= render "password_field" %>
3
+ <%%= render "password_confirm_field" if rodauth.require_password_confirmation? %>
4
+ <%%= render "submit", value: "Reset Password" %>
5
+ <%% end %>
@@ -0,0 +1,9 @@
1
+ <%%= form_tag rodauth.reset_password_request_path, method: :post do %>
2
+ <p>If you have forgotten your password, you can request a password reset:</p>
3
+ <%% if params[rodauth.login_param] && !rodauth.field_error(rodauth.login_param) %>
4
+ <%%= render "login_hidden_field" %>
5
+ <%% else %>
6
+ <%%= render "login_field" %>
7
+ <%% end %>
8
+ <%%= render "submit", value: "Request Password Reset" %>
9
+ <%% end %>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.sms_auth_path, method: :post do %>
2
+ <%%= render "sms_code_field" %>
3
+ <%%= render "submit", value: "Authenticate via SMS Code" %>
4
+ <%% end %>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.sms_confirm_path, method: :post do %>
2
+ <%%= render "sms_code_field" %>
3
+ <%%= render "submit", value: "Confirm SMS Backup Number" %>
4
+ <%% end %>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.sms_disable_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
3
+ <%%= render "submit", value: "Disable Backup SMS Authentication" %>
4
+ <%% end %>
@@ -0,0 +1,3 @@
1
+ <%%= form_tag rodauth.sms_request_path, method: :post do %>
2
+ <%%= render "submit", value: "Send SMS Code" %>
3
+ <%% end %>
@@ -0,0 +1,5 @@
1
+ <%%= form_tag rodauth.sms_setup_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
3
+ <%%= render "sms_phone_field" %>
4
+ <%%= render "submit", value: "Setup SMS Backup Number" %>
5
+ <%% end %>
@@ -0,0 +1,5 @@
1
+ <ul>
2
+ <%% rodauth.two_factor_auth_links.sort.each do |_, link, text| %>
3
+ <li><%%= link_to text, link %></li>
4
+ <%% end %>
5
+ </ul>
@@ -0,0 +1,4 @@
1
+ <%%= form_tag rodauth.two_factor_disable_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
3
+ <%%= render "submit", value: "Remove All Multifactor Authentication Methods" %>
4
+ <%% end %>
@@ -0,0 +1,22 @@
1
+ <%% if rodauth.two_factor_setup_links.any? %>
2
+ <h2>Setup Multifactor Authentication</h2>
3
+
4
+ <ul>
5
+ <%% rodauth.two_factor_setup_links.sort.each do |_, link, text| %>
6
+ <li><%%= link_to text, link %></li>
7
+ <%% end %>
8
+ </ul>
9
+ <%% end %>
10
+
11
+ <%% if rodauth.two_factor_remove_links.any? %>
12
+ <h2>Remove Multifactor Authentication</h2>
13
+
14
+ <ul>
15
+ <%% rodauth.two_factor_remove_links.sort.each do |_, link, text| %>
16
+ <li><%%= link_to text, link %></li>
17
+ <%% end %>
18
+ <%% if rodauth.two_factor_remove_links.length > 1 %>
19
+ <li><%%= link_to "Remove All Multifactor Authentication Methods", rodauth.two_factor_disable_path %></li>
20
+ <%% end %>
21
+ </ul>
22
+ <%% end %>
@@ -0,0 +1,5 @@
1
+ <%%= form_tag rodauth.unlock_account_path, method: :post do %>
2
+ <p>This account is currently locked out. You can unlock the account:</p>
3
+ <%%= render "password_field" if rodauth.unlock_account_requires_password? %>
4
+ <%%= render "submit", value: "Unlock Account" %>
5
+ <%% end %>
@@ -0,0 +1,5 @@
1
+ <%%= form_tag rodauth.unlock_account_request_path, method: :post do %>
2
+ <p>This account is currently locked out. You can request that the account be unlocked:</p>
3
+ <%%= render "login_hidden_field" %>
4
+ <%%= render "submit", value: "Request Account Unlock" %>
5
+ <%% end %>
@@ -0,0 +1,5 @@
1
+ <%%= form_tag rodauth.verify_account_path, method: :post do %>
2
+ <%%= render "password_field" if rodauth.verify_account_set_password? %>
3
+ <%%= render "password_confirm_field" if rodauth.verify_account_set_password? && rodauth.require_password_confirmation? %>
4
+ <%%= render "submit", value: "Verify Account" %>
5
+ <%% end %>
@@ -0,0 +1,9 @@
1
+ <%%= form_tag rodauth.verify_account_resend_path, method: :post do %>
2
+ <p>If you no longer have the email to verify the account, you can request that it be resent to you:</p>
3
+ <%% if params[rodauth.login_param] %>
4
+ <%%= render "login_hidden_field" %>
5
+ <%% else %>
6
+ <%%= render "login_field" %>
7
+ <%% end %>
8
+ <%%= render "submit", value: "Send Verification Login Again" %>
9
+ <%% end %>
@@ -0,0 +1,3 @@
1
+ <%%= form_tag rodauth.verify_login_change_path, method: :post do %>
2
+ <%%= render "submit", value: "Verify Login Change" %>
3
+ <%% end %>
@@ -0,0 +1,13 @@
1
+ <%% cred = rodauth.webauth_credential_options_for_get %>
2
+
3
+ <%%= form_tag rodauth.webauthn_auth_form_path, method: :post, id: "webauthn-auth-form", data: { credential_options: cred.as_json.to_json } do %>
4
+ <%%= render "login_hidden_field" if params[rodauth.login_param] %>
5
+ <%%= hidden_field_tag rodauth.webauthn_auth_challenge_param, cred.challenge %>
6
+ <%%= hidden_field_tag rodauth.webauthn_auth_challenge_hmac_param, rodauth.compute_hmac(cred.challenge) %>
7
+ <%%= text_field_tag rodauth.webauthn_auth_param, "", id: "webauthn-auth", aria: { hidden: "true" } %>
8
+ <div id="webauthn-auth-button">
9
+ <%%= render "submit", value: "Authenticate Using WebAuthn" %>
10
+ </div>
11
+ <%% end %>
12
+
13
+ <%%= javascript_include_tag rodauth.webauthn_auth_js_path %>
@@ -0,0 +1,13 @@
1
+ <%%= form_tag rodauth.webauthn_remove_path, method: :post, id: "webauthn-remove-form" do %>
2
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
3
+ <fieldset class="form-group">
4
+ <%% (usage = rodauth.account_webauthn_usage).each do |id, last_use| %>
5
+ <div class="form-check">
6
+ <%%= render "field", name: rodauth.webauthn_remove_param, id: "webauthn-remove-#{id}", type: :radio, class: "form-check-input", skip_error_message: true, value: id, required: false %>
7
+ <%%= label_tag "webauthn-remove-#{id}", "Last use: #{last_use}", class: "form-check-label" %>
8
+ <%%= render "field_error", name: rodauth.webauthn_remove_param if id == usage.keys.last %>
9
+ </div>
10
+ <%% end %>
11
+ </fieldset>
12
+ <%%= render "submit", value: "Remove WebAuthn Authenticator" %>
13
+ <%% end %>
@@ -0,0 +1,13 @@
1
+ <%% cred = rodauth.new_webauthn_credential %>
2
+
3
+ <%%= form_tag rodauth.webauthn_setup_path, method: :post, id: "webauthn-setup-form", data: { credential_options: cred.as_json.to_json } do %>
4
+ <%%= hidden_field_tag rodauth.webauthn_setup_challenge_param, cred.challenge %>
5
+ <%%= hidden_field_tag rodauth.webauthn_setup_challenge_hmac_param, rodauth.compute_hmac(cred.challenge) %>
6
+ <%%= text_field_tag rodauth.webauthn_setup_param, "", id: "webauthn-setup", aria: { hidden: "true" } %>
7
+ <%%= render "password_field" if rodauth.two_factor_modifications_require_password? %>
8
+ <div id="webauthn-setup-button">
9
+ <%%= render "submit", value: "Setup WebAuthn Authentication" %>
10
+ </div>
11
+ <%% end %>
12
+
13
+ <%%= javascript_include_tag rodauth.webauthn_setup_js_path %>
@@ -0,0 +1,5 @@
1
+ Someone has requested a login link for the account with this email
2
+ address. If you did not request a login link, please ignore this
3
+ message. If you requested a login link, please go to
4
+ <%%= @email_link %>
5
+ to login to this account.
@@ -0,0 +1,2 @@
1
+ Someone (hopefully you) has changed the password for the account
2
+ associated to this email address.
@@ -0,0 +1,5 @@
1
+ Someone has requested a password reset for the account with this email
2
+ address. If you did not request a password reset, please ignore this
3
+ message. If you requested a password reset, please go to
4
+ <%%= @email_link %>
5
+ to reset the password for the account.
@@ -0,0 +1,5 @@
1
+ Someone has requested a that the account with this email be unlocked.
2
+ If you did not request the unlocking of this account, please ignore this
3
+ message. If you requested the unlocking of this account, please go to
4
+ <%%= @email_link %>
5
+ to unlock this account.
@@ -0,0 +1,4 @@
1
+ Someone has created an account with this email address. If you did not create
2
+ this account, please ignore this message. If you created this account, please go to
3
+ <%%= @email_link %>
4
+ to verify the account.
@@ -0,0 +1,10 @@
1
+ Someone with an account has requested their login be changed to this email address:
2
+
3
+ Old email: <%%= @old_login %>
4
+
5
+ New email: <%%= @new_login %>
6
+
7
+ If you did not request this login change, please ignore this message. If you
8
+ requested this login change, please go to
9
+ <%%= @email_link %>
10
+ to verify the login change.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "rodauth-rails"
3
- spec.version = "0.1.0"
3
+ spec.version = "0.1.1"
4
4
  spec.authors = ["Janko Marohnić"]
5
5
  spec.email = ["janko.marohnic@gmail.com"]
6
6
 
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.required_ruby_version = ">= 2.2.0"
13
13
 
14
- spec.files = Dir["README.md", "LICENSE.txt", "CHANGELOG.md", "lib/**/*.rb", "*.gemspec"]
14
+ spec.files = Dir["README.md", "LICENSE.txt", "CHANGELOG.md", "lib/**/*", "*.gemspec"]
15
15
  spec.require_paths = ["lib"]
16
16
 
17
17
  spec.add_dependency "railties", ">= 4.2", "< 7"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -106,6 +106,66 @@ files:
106
106
  - lib/generators/rodauth/templates/app/controllers/rodauth_controller.rb
107
107
  - lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb
108
108
  - lib/generators/rodauth/templates/app/models/account.rb
109
+ - lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb
110
+ - lib/generators/rodauth/templates/app/views/rodauth/_field.html.erb
111
+ - lib/generators/rodauth/templates/app/views/rodauth/_field_error.html.erb
112
+ - lib/generators/rodauth/templates/app/views/rodauth/_global_logout_field.html.erb
113
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_confirm_field.html.erb
114
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_display.html.erb
115
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_field.html.erb
116
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
117
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_form_footer.html.erb
118
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_form_header.html.erb
119
+ - lib/generators/rodauth/templates/app/views/rodauth/_login_hidden_field.html.erb
120
+ - lib/generators/rodauth/templates/app/views/rodauth/_new_password_field.html.erb
121
+ - lib/generators/rodauth/templates/app/views/rodauth/_otp_auth_code_field.html.erb
122
+ - lib/generators/rodauth/templates/app/views/rodauth/_password_confirm_field.html.erb
123
+ - lib/generators/rodauth/templates/app/views/rodauth/_password_field.html.erb
124
+ - lib/generators/rodauth/templates/app/views/rodauth/_recovery_code_field.html.erb
125
+ - lib/generators/rodauth/templates/app/views/rodauth/_recovery_codes_form.html.erb
126
+ - lib/generators/rodauth/templates/app/views/rodauth/_sms_code_field.html.erb
127
+ - lib/generators/rodauth/templates/app/views/rodauth/_sms_phone_field.html.erb
128
+ - lib/generators/rodauth/templates/app/views/rodauth/_submit.html.erb
129
+ - lib/generators/rodauth/templates/app/views/rodauth/add_recovery_codes.html.erb
130
+ - lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb
131
+ - lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb
132
+ - lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb
133
+ - lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb
134
+ - lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb
135
+ - lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb
136
+ - lib/generators/rodauth/templates/app/views/rodauth/login.html.erb
137
+ - lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb
138
+ - lib/generators/rodauth/templates/app/views/rodauth/multi_phase_login.html.erb
139
+ - lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb
140
+ - lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb
141
+ - lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb
142
+ - lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb
143
+ - lib/generators/rodauth/templates/app/views/rodauth/recovery_codes.html.erb
144
+ - lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb
145
+ - lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb
146
+ - lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb
147
+ - lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb
148
+ - lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb
149
+ - lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb
150
+ - lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb
151
+ - lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb
152
+ - lib/generators/rodauth/templates/app/views/rodauth/two_factor_auth.html.erb
153
+ - lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb
154
+ - lib/generators/rodauth/templates/app/views/rodauth/two_factor_manage.html.erb
155
+ - lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb
156
+ - lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb
157
+ - lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb
158
+ - lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb
159
+ - lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb
160
+ - lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb
161
+ - lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
162
+ - lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb
163
+ - lib/generators/rodauth/templates/app/views/rodauth_mailer/email_auth.text.erb
164
+ - lib/generators/rodauth/templates/app/views/rodauth_mailer/password_changed.text.erb
165
+ - lib/generators/rodauth/templates/app/views/rodauth_mailer/reset_password.text.erb
166
+ - lib/generators/rodauth/templates/app/views/rodauth_mailer/unlock_account.text.erb
167
+ - lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_account.text.erb
168
+ - lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_login_change.text.erb
109
169
  - lib/generators/rodauth/templates/config/initializers/rodauth.rb
110
170
  - lib/generators/rodauth/templates/config/initializers/sequel.rb
111
171
  - lib/generators/rodauth/templates/db/migrate/create_rodauth.rb