rodauth-rails 0.17.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +66 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +338 -623
  5. data/lib/generators/rodauth/install_generator.rb +33 -36
  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 +27 -0
  10. data/lib/generators/rodauth/templates/app/{lib/rodauth_app.rb → misc/rodauth_main.rb} +9 -52
  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 +22 -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/internal_request.rb +10 -4
  59. data/lib/rodauth/rails/feature/render.rb +9 -1
  60. data/lib/rodauth/rails/railtie.rb +4 -2
  61. data/lib/rodauth/rails/tasks.rake +2 -2
  62. data/lib/rodauth/rails/version.rb +1 -1
  63. data/lib/rodauth/rails.rb +16 -26
  64. data/rodauth-rails.gemspec +2 -2
  65. metadata +9 -23
  66. data/lib/generators/rodauth/templates/app/views/rodauth/_field.html.erb +0 -10
  67. data/lib/generators/rodauth/templates/app/views/rodauth/_field_error.html.erb +0 -3
  68. data/lib/generators/rodauth/templates/app/views/rodauth/_global_logout_field.html.erb +0 -6
  69. data/lib/generators/rodauth/templates/app/views/rodauth/_login_confirm_field.html.erb +0 -4
  70. data/lib/generators/rodauth/templates/app/views/rodauth/_login_display.html.erb +0 -4
  71. data/lib/generators/rodauth/templates/app/views/rodauth/_login_field.html.erb +0 -4
  72. data/lib/generators/rodauth/templates/app/views/rodauth/_login_hidden_field.html.erb +0 -1
  73. data/lib/generators/rodauth/templates/app/views/rodauth/_new_password_field.html.erb +0 -4
  74. data/lib/generators/rodauth/templates/app/views/rodauth/_otp_auth_code_field.html.erb +0 -8
  75. data/lib/generators/rodauth/templates/app/views/rodauth/_password_confirm_field.html.erb +0 -4
  76. data/lib/generators/rodauth/templates/app/views/rodauth/_password_field.html.erb +0 -4
  77. data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_code_field.html.erb +0 -4
  78. data/lib/generators/rodauth/templates/app/views/rodauth/_recovery_codes_form.html.erb +0 -6
  79. data/lib/generators/rodauth/templates/app/views/rodauth/_sms_code_field.html.erb +0 -8
  80. data/lib/generators/rodauth/templates/app/views/rodauth/_sms_phone_field.html.erb +0 -8
  81. 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: 458a4a5552c124a1e7587837bbd57eed020857ae691bcc4b1f2e2639df774bb8
4
- data.tar.gz: b19da17830585641950d026dff75ebd32ded19ad16dd5fb5c3b8a33c34b0a8f6
3
+ metadata.gz: 8643f8a912963b78be7d03a815b813688304f4e4b2777a1fdade807f79a4c712
4
+ data.tar.gz: 31aadb16115fc826750b7d160dcb572ae9c24255d99a7c640abef5fd157bd319
5
5
  SHA512:
6
- metadata.gz: 01d5c774269d260e2805e0a2e4a509d9db81a3a966e94176cd6c5df6d808356feee48c5009b9692e0647034ae1c4d6ea3dc29627fa2000d05821a4402080601a
7
- data.tar.gz: 1dde8d0ffb4605d3abf7893628a804eca7c0fbc94f2418176651dce81fac14eb4dfe1d165e315288a2a46373b818c795e15e9d58b5ad77f15b1fb5c3d9efc4be
6
+ metadata.gz: dd27d717b3a01f0b5f43e346c0cd839e2703ee0db44f7503eb6ce80f7cffd4493f4ed9e208db474af56af536f675444170f16a6d47435e1f4ce2af38a7487916
7
+ data.tar.gz: bbac5b7492751e76886a5bcd275af78aada1026d2cd95ddee732817e8d7a5a154f559e5c27ce08606d444a1ffd4640f8522744bd13939f6491288d57c986fea0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,69 @@
1
+ ## 1.1.0 (2022-01-16)
2
+
3
+ * Automatically route the path prefix in `r.rodauth` if one has been set (@janko)
4
+
5
+ ## 1.0.0 (2021-12-25)
6
+
7
+ * Set Rodauth's email subject in the generated mailer (@janko)
8
+
9
+ * Raise error when outside of a request and `config.action_mailer.default_url_options` is unset (@janko)
10
+
11
+ * Avoid method re-definition warnings with named auth classes caused by `post_configure` being called twice (@janko)
12
+
13
+ * Don't modify `config.action_mailer.default_url_options` when `:protocol` is missing (@janko)
14
+
15
+ * Move `Rodauth::Rails.url_options` into `Rodauth::Auth#rails_url_options` (@janko)
16
+
17
+ * Generate named auth classes in `rodauth:install` generator (@janko)
18
+
19
+ * Generate `rodauth_app.rb` in `app/misc` directory (@janko)
20
+
21
+ * Add `--name` option to `rodauth:migration` generator (@janko)
22
+
23
+ * Disable Turbo in all built-in and generated views (@janko)
24
+
25
+ * Modify generated mailer integration to generate URLs according to `default_url_options` (@janko)
26
+
27
+ * Skip Active Record files in `rodauth:install` if `ActiveRecord::Railtie` is not defined (@janko)
28
+
29
+ * Stop loading `pass` plugin in `Rodauth::Rails::App` (@janko)
30
+
31
+ * Remove deprecated `:query` and `:form` options in `Rodauth::Rails.rodauth` (@janko)
32
+
33
+ * Require internal_request feature to be enabled in `Rodauth::Rails.rodauth` (@janko)
34
+
35
+ ## 0.18.1 (2021-12-16)
36
+
37
+ * Loosen Rails gem dependency to allow Rails 7.x (Intrepidd)
38
+
39
+ ## 0.18.0 (2021-11-05)
40
+
41
+ * Disable Turbo on the generated login form (@janko)
42
+
43
+ * Generate controller views with `form_with` helper on Rails 5.1+ (@janko)
44
+
45
+ * Fix missing layout error when rendering Rodauth's built-in templates when using Turbo on Rails 6.0+ (@janko)
46
+
47
+ * Fix `Rodauth::Rails.middleware` config not actually affecting middleware insertion (@janko)
48
+
49
+ * Set page titles in generated view templates (@janko)
50
+
51
+ * Merge field and button partials into view templates (@janko)
52
+
53
+ * Raise error for unknown configuration in `Rodauth::Rails.model` (@janko)
54
+
55
+ * Generate views for all enabled features by default in `rodauth:views` generator (@janko)
56
+
57
+ * Add `Rodauth::Rails::App.rodauth!` which raises an error for unknown configuration (@janko)
58
+
59
+ * Remove deprecated `--features` option from `rodauth:views` generator (@janko)
60
+
61
+ * Inline `_recovery_codes_form.html.erb` partial into `recovery_codes.html.erb` (@janko)
62
+
63
+ * Use Rodauth helper methods for texts in generated views, for easier i18n (@janko)
64
+
65
+ * Allow setting passing a `Sequel::Model` to `:account` in `Rodauth::Rails.rodauth` (@janko)
66
+
1
67
  ## 0.17.1 (2021-10-20)
2
68
 
3
69
  * Skip checking CSRF when request forgery protection wasn't loaded on the controller (@janko)
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Janko Marohnić
3
+ Copyright (c) 2020-2022 Janko Marohnić
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal