rodauth-rails 0.17.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +80 -0
  3. data/README.md +224 -548
  4. data/lib/generators/rodauth/install_generator.rb +40 -35
  5. data/lib/generators/rodauth/migration/base.erb +8 -2
  6. data/lib/generators/rodauth/migration_generator.rb +9 -2
  7. data/lib/generators/rodauth/templates/INSTRUCTIONS +40 -0
  8. data/lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb +36 -19
  9. data/lib/generators/rodauth/templates/app/misc/rodauth_app.rb +38 -0
  10. data/lib/generators/rodauth/templates/app/{lib/rodauth_app.rb → misc/rodauth_main.rb} +10 -53
  11. data/lib/generators/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +7 -4
  12. data/lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb +26 -9
  13. data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_footer.html.erb +7 -6
  14. data/lib/generators/rodauth/templates/app/views/rodauth/_login_form_header.html.erb +3 -3
  15. data/lib/generators/rodauth/templates/app/views/rodauth/add_recovery_codes.html.erb +7 -5
  16. data/lib/generators/rodauth/templates/app/views/rodauth/change_login.html.erb +29 -6
  17. data/lib/generators/rodauth/templates/app/views/rodauth/change_password.html.erb +29 -6
  18. data/lib/generators/rodauth/templates/app/views/rodauth/close_account.html.erb +15 -4
  19. data/lib/generators/rodauth/templates/app/views/rodauth/confirm_password.html.erb +13 -4
  20. data/lib/generators/rodauth/templates/app/views/rodauth/create_account.html.erb +37 -7
  21. data/lib/generators/rodauth/templates/app/views/rodauth/email_auth.html.erb +7 -3
  22. data/lib/generators/rodauth/templates/app/views/rodauth/login.html.erb +5 -3
  23. data/lib/generators/rodauth/templates/app/views/rodauth/logout.html.erb +16 -4
  24. data/lib/generators/rodauth/templates/app/views/rodauth/multi_phase_login.html.erb +5 -3
  25. data/lib/generators/rodauth/templates/app/views/rodauth/otp_auth.html.erb +17 -4
  26. data/lib/generators/rodauth/templates/app/views/rodauth/otp_disable.html.erb +15 -4
  27. data/lib/generators/rodauth/templates/app/views/rodauth/otp_setup.html.erb +30 -10
  28. data/lib/generators/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +13 -4
  29. data/lib/generators/rodauth/templates/app/views/rodauth/recovery_codes.html.erb +15 -1
  30. data/lib/generators/rodauth/templates/app/views/rodauth/remember.html.erb +14 -9
  31. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password.html.erb +21 -5
  32. data/lib/generators/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +19 -9
  33. data/lib/generators/rodauth/templates/app/views/rodauth/sms_auth.html.erb +17 -4
  34. data/lib/generators/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +17 -4
  35. data/lib/generators/rodauth/templates/app/views/rodauth/sms_disable.html.erb +15 -4
  36. data/lib/generators/rodauth/templates/app/views/rodauth/sms_request.html.erb +7 -3
  37. data/lib/generators/rodauth/templates/app/views/rodauth/sms_setup.html.erb +25 -5
  38. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_auth.html.erb +5 -3
  39. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +15 -4
  40. data/lib/generators/rodauth/templates/app/views/rodauth/two_factor_manage.html.erb +17 -15
  41. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account.html.erb +17 -5
  42. data/lib/generators/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +11 -5
  43. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account.html.erb +23 -5
  44. data/lib/generators/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +19 -9
  45. data/lib/generators/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +7 -3
  46. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +13 -9
  47. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +21 -9
  48. data/lib/generators/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +21 -9
  49. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/email_auth.text.erb +1 -1
  50. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/reset_password.text.erb +1 -1
  51. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/unlock_account.text.erb +1 -1
  52. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_account.text.erb +1 -1
  53. data/lib/generators/rodauth/templates/app/views/rodauth_mailer/verify_login_change.text.erb +3 -3
  54. data/lib/generators/rodauth/views_generator.rb +55 -93
  55. data/lib/rodauth/rails/app.rb +5 -4
  56. data/lib/rodauth/rails/auth.rb +1 -16
  57. data/lib/rodauth/rails/controller_methods.rb +1 -1
  58. data/lib/rodauth/rails/feature/csrf.rb +15 -4
  59. data/lib/rodauth/rails/feature/internal_request.rb +22 -20
  60. data/lib/rodauth/rails/feature/render.rb +9 -1
  61. data/lib/rodauth/rails/railtie.rb +4 -2
  62. data/lib/rodauth/rails/tasks.rake +2 -2
  63. data/lib/rodauth/rails/version.rb +1 -1
  64. data/lib/rodauth/rails.rb +16 -20
  65. data/rodauth-rails.gemspec +2 -2
  66. metadata +9 -23
  67. data/lib/generators/rodauth/templates/app/views/rodauth/_field.html.erb +0 -10
  68. data/lib/generators/rodauth/templates/app/views/rodauth/_field_error.html.erb +0 -3
  69. data/lib/generators/rodauth/templates/app/views/rodauth/_global_logout_field.html.erb +0 -6
  70. data/lib/generators/rodauth/templates/app/views/rodauth/_login_confirm_field.html.erb +0 -4
  71. data/lib/generators/rodauth/templates/app/views/rodauth/_login_display.html.erb +0 -4
  72. data/lib/generators/rodauth/templates/app/views/rodauth/_login_field.html.erb +0 -4
  73. data/lib/generators/rodauth/templates/app/views/rodauth/_login_hidden_field.html.erb +0 -1
  74. data/lib/generators/rodauth/templates/app/views/rodauth/_new_password_field.html.erb +0 -4
  75. data/lib/generators/rodauth/templates/app/views/rodauth/_otp_auth_code_field.html.erb +0 -8
  76. data/lib/generators/rodauth/templates/app/views/rodauth/_password_confirm_field.html.erb +0 -4
  77. data/lib/generators/rodauth/templates/app/views/rodauth/_password_field.html.erb +0 -4
  78. data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_code_field.html.erb +0 -4
  79. data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_codes_form.html.erb +0 -6
  80. data/lib/generators/rodauth/templates/app/views/rodauth/_sms_code_field.html.erb +0 -8
  81. data/lib/generators/rodauth/templates/app/views/rodauth/_sms_phone_field.html.erb +0 -8
  82. data/lib/generators/rodauth/templates/app/views/rodauth/_submit.html.erb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1539e5f70a8cefa3c40e06b5b177152e4772f099deb11a077f07f59529622a62
4
- data.tar.gz: 67c9a6829f8a9c45708cb1ab0781a2eebe1998d5f31f66b26d5c7f58cb37cdf8
3
+ metadata.gz: 34d196440d63f28b871b42b21686018546c3e98df2239f69611847a0b3a2546a
4
+ data.tar.gz: d73de73af3c8985be686bf512c7b15bdf9bf27ecda1bfe30ad8d8a21964f0de0
5
5
  SHA512:
6
- metadata.gz: bf1f132504de2266dc4ef7f71ffdd630e348119f6681f84288aeb6ba24481336948c78183d4fa7e90100dedc85e04c4bb98f915de3ecf156630d523d91d74c00
7
- data.tar.gz: e1858507c3ee9a2855e04fa67957859f41347adbf448793b8cebe263a0bd95517ef913b4132470a31609be9741ff73e4769309df5924f19b0db0503a1a25fa2a
6
+ metadata.gz: acddd3554346ce6f7048ac56a59e0f0439312668fbf8e94450fd23d4d2464ad82655e221e6e15cd5755ef9207c49fe56c6fb67d95bbb764989ec39c6ff4df46a
7
+ data.tar.gz: a2be70d18c1ac8f1d6fca8eaef39a54c88a468dc96140eff05b5bb6bf9c901b93de64fd71c9dc27ef302edf643d024e34141b9258b3879a75e0aa96af28b7a27
data/CHANGELOG.md CHANGED
@@ -1,3 +1,83 @@
1
+ ## 1.0.0 (2021-12-25)
2
+
3
+ * Set Rodauth's email subject in the generated mailer (@janko)
4
+
5
+ * Raise error when outside of a request and `config.action_mailer.default_url_options` is unset (@janko)
6
+
7
+ * Avoid method re-definition warnings with named auth classes caused by `post_configure` being called twice (@janko)
8
+
9
+ * Don't modify `config.action_mailer.default_url_options` when `:protocol` is missing (@janko)
10
+
11
+ * Move `Rodauth::Rails.url_options` into `Rodauth::Auth#rails_url_options` (@janko)
12
+
13
+ * Generate named auth classes in `rodauth:install` generator (@janko)
14
+
15
+ * Generate `rodauth_app.rb` in `app/misc` directory (@janko)
16
+
17
+ * Add `--name` option to `rodauth:migration` generator (@janko)
18
+
19
+ * Disable Turbo in all built-in and generated views (@janko)
20
+
21
+ * Modify generated mailer integration to generate URLs according to `default_url_options` (@janko)
22
+
23
+ * Skip Active Record files in `rodauth:install` if `ActiveRecord::Railtie` is not defined (@janko)
24
+
25
+ * Stop loading `pass` plugin in `Rodauth::Rails::App` (@janko)
26
+
27
+ * Remove deprecated `:query` and `:form` options in `Rodauth::Rails.rodauth` (@janko)
28
+
29
+ * Require internal_request feature to be enabled in `Rodauth::Rails.rodauth` (@janko)
30
+
31
+ ## 0.18.1 (2021-12-16)
32
+
33
+ * Loosen Rails gem dependency to allow Rails 7.x (Intrepidd)
34
+
35
+ ## 0.18.0 (2021-11-05)
36
+
37
+ * Disable Turbo on the generated login form (@janko)
38
+
39
+ * Generate controller views with `form_with` helper on Rails 5.1+ (@janko)
40
+
41
+ * Fix missing layout error when rendering Rodauth's built-in templates when using Turbo on Rails 6.0+ (@janko)
42
+
43
+ * Fix `Rodauth::Rails.middleware` config not actually affecting middleware insertion (@janko)
44
+
45
+ * Set page titles in generated view templates (@janko)
46
+
47
+ * Merge field and button partials into view templates (@janko)
48
+
49
+ * Raise error for unknown configuration in `Rodauth::Rails.model` (@janko)
50
+
51
+ * Generate views for all enabled features by default in `rodauth:views` generator (@janko)
52
+
53
+ * Add `Rodauth::Rails::App.rodauth!` which raises an error for unknown configuration (@janko)
54
+
55
+ * Remove deprecated `--features` option from `rodauth:views` generator (@janko)
56
+
57
+ * Inline `_recovery_codes_form.html.erb` partial into `recovery_codes.html.erb` (@janko)
58
+
59
+ * Use Rodauth helper methods for texts in generated views, for easier i18n (@janko)
60
+
61
+ * Allow setting passing a `Sequel::Model` to `:account` in `Rodauth::Rails.rodauth` (@janko)
62
+
63
+ ## 0.17.1 (2021-10-20)
64
+
65
+ * Skip checking CSRF when request forgery protection wasn't loaded on the controller (@janko)
66
+
67
+ * Create partial unique index for `accounts.email` column when using `sqlite3` adapter (@janko)
68
+
69
+ * Revert setting `delete_account_on_close?` to `true` in generated `rodauth_app.rb` (@janko)
70
+
71
+ * Disable Turbo in `_recovery_codes_form.html.erb`, since viewing recovery codes isn't Turbo-compatible (@janko)
72
+
73
+ * Generate JSON configuration on `rodauth:install` for API-only with sessions enabled (@janko)
74
+
75
+ * Generate JWT configuration on `rodauth:install` only for API-only apps without sessions enabled (@janko)
76
+
77
+ * Don't generate JWT configuration when `rodauth:install --json` was run in API-only app (@janko)
78
+
79
+ * Use `config.action_mailer.default_url_options` in path_class_methods feature (@janko)
80
+
1
81
  ## 0.17.0 (2021-10-05)
2
82
 
3
83
  * Set `delete_account_on_close?` to `true` in generated `rodauth_app.rb` (@janko)