devise 4.3.0 → 4.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +205 -2
  3. data/MIT-LICENSE +2 -1
  4. data/README.md +214 -57
  5. data/app/controllers/devise/confirmations_controller.rb +3 -0
  6. data/app/controllers/devise/omniauth_callbacks_controller.rb +3 -1
  7. data/app/controllers/devise/passwords_controller.rb +5 -2
  8. data/app/controllers/devise/registrations_controller.rb +32 -12
  9. data/app/controllers/devise/sessions_controller.rb +4 -2
  10. data/app/controllers/devise/unlocks_controller.rb +3 -0
  11. data/app/controllers/devise_controller.rb +6 -3
  12. data/app/helpers/devise_helper.rb +23 -18
  13. data/app/mailers/devise/mailer.rb +7 -5
  14. data/app/views/devise/confirmations/new.html.erb +2 -2
  15. data/app/views/devise/passwords/edit.html.erb +3 -3
  16. data/app/views/devise/passwords/new.html.erb +2 -2
  17. data/app/views/devise/registrations/edit.html.erb +6 -6
  18. data/app/views/devise/registrations/new.html.erb +4 -4
  19. data/app/views/devise/sessions/new.html.erb +4 -4
  20. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  21. data/app/views/devise/shared/_links.html.erb +8 -8
  22. data/app/views/devise/unlocks/new.html.erb +2 -2
  23. data/config/locales/en.yml +3 -2
  24. data/lib/devise/controllers/helpers.rb +10 -8
  25. data/lib/devise/controllers/rememberable.rb +2 -0
  26. data/lib/devise/controllers/responder.rb +35 -0
  27. data/lib/devise/controllers/scoped_views.rb +2 -0
  28. data/lib/devise/controllers/sign_in_out.rb +14 -4
  29. data/lib/devise/controllers/store_location.rb +24 -6
  30. data/lib/devise/controllers/url_helpers.rb +3 -1
  31. data/lib/devise/delegator.rb +2 -0
  32. data/lib/devise/encryptor.rb +2 -0
  33. data/lib/devise/failure_app.rb +33 -7
  34. data/lib/devise/hooks/activatable.rb +2 -0
  35. data/lib/devise/hooks/csrf_cleaner.rb +8 -1
  36. data/lib/devise/hooks/forgetable.rb +2 -0
  37. data/lib/devise/hooks/lockable.rb +4 -5
  38. data/lib/devise/hooks/proxy.rb +2 -0
  39. data/lib/devise/hooks/rememberable.rb +2 -0
  40. data/lib/devise/hooks/timeoutable.rb +4 -2
  41. data/lib/devise/hooks/trackable.rb +2 -0
  42. data/lib/devise/mailers/helpers.rb +2 -0
  43. data/lib/devise/mapping.rb +3 -1
  44. data/lib/devise/models/authenticatable.rb +55 -50
  45. data/lib/devise/models/confirmable.rb +36 -40
  46. data/lib/devise/models/database_authenticatable.rb +57 -36
  47. data/lib/devise/models/lockable.rb +18 -4
  48. data/lib/devise/models/omniauthable.rb +4 -2
  49. data/lib/devise/models/recoverable.rb +10 -19
  50. data/lib/devise/models/registerable.rb +4 -0
  51. data/lib/devise/models/rememberable.rb +5 -3
  52. data/lib/devise/models/timeoutable.rb +3 -1
  53. data/lib/devise/models/trackable.rb +15 -1
  54. data/lib/devise/models/validatable.rb +7 -10
  55. data/lib/devise/models.rb +3 -0
  56. data/lib/devise/modules.rb +2 -0
  57. data/lib/devise/omniauth/config.rb +2 -0
  58. data/lib/devise/omniauth/url_helpers.rb +2 -0
  59. data/lib/devise/omniauth.rb +4 -5
  60. data/lib/devise/orm/active_record.rb +2 -0
  61. data/lib/devise/orm/mongoid.rb +2 -0
  62. data/lib/devise/orm.rb +71 -0
  63. data/lib/devise/parameter_filter.rb +4 -0
  64. data/lib/devise/parameter_sanitizer.rb +15 -1
  65. data/lib/devise/rails/deprecated_constant_accessor.rb +39 -0
  66. data/lib/devise/rails/routes.rb +8 -6
  67. data/lib/devise/rails/warden_compat.rb +2 -0
  68. data/lib/devise/rails.rb +3 -5
  69. data/lib/devise/secret_key_finder.rb +27 -0
  70. data/lib/devise/strategies/authenticatable.rb +3 -1
  71. data/lib/devise/strategies/base.rb +2 -0
  72. data/lib/devise/strategies/database_authenticatable.rb +8 -1
  73. data/lib/devise/strategies/rememberable.rb +2 -0
  74. data/lib/devise/test/controller_helpers.rb +6 -1
  75. data/lib/devise/test/integration_helpers.rb +3 -1
  76. data/lib/devise/test_helpers.rb +2 -0
  77. data/lib/devise/time_inflector.rb +2 -0
  78. data/lib/devise/token_generator.rb +2 -0
  79. data/lib/devise/version.rb +3 -1
  80. data/lib/devise.rb +38 -12
  81. data/lib/generators/active_record/devise_generator.rb +40 -12
  82. data/lib/generators/active_record/templates/migration.rb +3 -1
  83. data/lib/generators/active_record/templates/migration_existing.rb +2 -0
  84. data/lib/generators/devise/controllers_generator.rb +3 -1
  85. data/lib/generators/devise/devise_generator.rb +5 -3
  86. data/lib/generators/devise/install_generator.rb +3 -5
  87. data/lib/generators/devise/orm_helpers.rb +9 -3
  88. data/lib/generators/devise/views_generator.rb +8 -9
  89. data/lib/generators/mongoid/devise_generator.rb +7 -5
  90. data/lib/generators/templates/README +9 -1
  91. data/lib/generators/templates/controllers/confirmations_controller.rb +2 -0
  92. data/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +3 -1
  93. data/lib/generators/templates/controllers/passwords_controller.rb +2 -0
  94. data/lib/generators/templates/controllers/registrations_controller.rb +2 -0
  95. data/lib/generators/templates/controllers/sessions_controller.rb +2 -0
  96. data/lib/generators/templates/controllers/unlocks_controller.rb +2 -0
  97. data/lib/generators/templates/devise.rb +43 -7
  98. data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +5 -1
  99. data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +10 -2
  100. data/lib/generators/templates/simple_form_for/passwords/new.html.erb +4 -1
  101. data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +12 -4
  102. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +11 -3
  103. data/lib/generators/templates/simple_form_for/sessions/new.html.erb +7 -2
  104. data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +4 -1
  105. metadata +24 -307
  106. data/.gitignore +0 -10
  107. data/.travis.yml +0 -58
  108. data/.yardopts +0 -9
  109. data/CODE_OF_CONDUCT.md +0 -22
  110. data/CONTRIBUTING.md +0 -79
  111. data/Gemfile +0 -40
  112. data/Gemfile.lock +0 -194
  113. data/Rakefile +0 -36
  114. data/bin/test +0 -13
  115. data/devise.gemspec +0 -26
  116. data/devise.png +0 -0
  117. data/gemfiles/Gemfile.rails-4.1-stable +0 -30
  118. data/gemfiles/Gemfile.rails-4.1-stable.lock +0 -171
  119. data/gemfiles/Gemfile.rails-4.2-stable +0 -30
  120. data/gemfiles/Gemfile.rails-4.2-stable.lock +0 -192
  121. data/gemfiles/Gemfile.rails-5.0-stable +0 -34
  122. data/gemfiles/Gemfile.rails-5.0-stable.lock +0 -193
  123. data/guides/bug_report_templates/integration_test.rb +0 -104
  124. data/test/controllers/custom_registrations_controller_test.rb +0 -40
  125. data/test/controllers/custom_strategy_test.rb +0 -64
  126. data/test/controllers/helper_methods_test.rb +0 -22
  127. data/test/controllers/helpers_test.rb +0 -316
  128. data/test/controllers/inherited_controller_i18n_messages_test.rb +0 -51
  129. data/test/controllers/internal_helpers_test.rb +0 -127
  130. data/test/controllers/load_hooks_controller_test.rb +0 -19
  131. data/test/controllers/passwords_controller_test.rb +0 -32
  132. data/test/controllers/sessions_controller_test.rb +0 -106
  133. data/test/controllers/url_helpers_test.rb +0 -65
  134. data/test/delegator_test.rb +0 -19
  135. data/test/devise_test.rb +0 -107
  136. data/test/failure_app_test.rb +0 -338
  137. data/test/generators/active_record_generator_test.rb +0 -83
  138. data/test/generators/controllers_generator_test.rb +0 -48
  139. data/test/generators/devise_generator_test.rb +0 -39
  140. data/test/generators/install_generator_test.rb +0 -24
  141. data/test/generators/mongoid_generator_test.rb +0 -23
  142. data/test/generators/views_generator_test.rb +0 -103
  143. data/test/helpers/devise_helper_test.rb +0 -49
  144. data/test/integration/authenticatable_test.rb +0 -698
  145. data/test/integration/confirmable_test.rb +0 -324
  146. data/test/integration/database_authenticatable_test.rb +0 -95
  147. data/test/integration/http_authenticatable_test.rb +0 -106
  148. data/test/integration/lockable_test.rb +0 -240
  149. data/test/integration/mounted_engine_test.rb +0 -36
  150. data/test/integration/omniauthable_test.rb +0 -135
  151. data/test/integration/recoverable_test.rb +0 -347
  152. data/test/integration/registerable_test.rb +0 -363
  153. data/test/integration/rememberable_test.rb +0 -217
  154. data/test/integration/timeoutable_test.rb +0 -184
  155. data/test/integration/trackable_test.rb +0 -92
  156. data/test/mailers/confirmation_instructions_test.rb +0 -115
  157. data/test/mailers/email_changed_test.rb +0 -130
  158. data/test/mailers/mailer_test.rb +0 -18
  159. data/test/mailers/reset_password_instructions_test.rb +0 -96
  160. data/test/mailers/unlock_instructions_test.rb +0 -91
  161. data/test/mapping_test.rb +0 -134
  162. data/test/models/authenticatable_test.rb +0 -23
  163. data/test/models/confirmable_test.rb +0 -536
  164. data/test/models/database_authenticatable_test.rb +0 -281
  165. data/test/models/lockable_test.rb +0 -350
  166. data/test/models/omniauthable_test.rb +0 -7
  167. data/test/models/recoverable_test.rb +0 -261
  168. data/test/models/registerable_test.rb +0 -7
  169. data/test/models/rememberable_test.rb +0 -182
  170. data/test/models/serializable_test.rb +0 -54
  171. data/test/models/timeoutable_test.rb +0 -51
  172. data/test/models/trackable_test.rb +0 -41
  173. data/test/models/validatable_test.rb +0 -119
  174. data/test/models_test.rb +0 -153
  175. data/test/omniauth/config_test.rb +0 -59
  176. data/test/omniauth/url_helpers_test.rb +0 -51
  177. data/test/orm/active_record.rb +0 -17
  178. data/test/orm/mongoid.rb +0 -13
  179. data/test/parameter_sanitizer_test.rb +0 -75
  180. data/test/rails_app/Rakefile +0 -6
  181. data/test/rails_app/app/active_record/admin.rb +0 -6
  182. data/test/rails_app/app/active_record/shim.rb +0 -2
  183. data/test/rails_app/app/active_record/user.rb +0 -7
  184. data/test/rails_app/app/active_record/user_on_engine.rb +0 -7
  185. data/test/rails_app/app/active_record/user_on_main_app.rb +0 -7
  186. data/test/rails_app/app/active_record/user_without_email.rb +0 -8
  187. data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -6
  188. data/test/rails_app/app/controllers/admins_controller.rb +0 -6
  189. data/test/rails_app/app/controllers/application_controller.rb +0 -11
  190. data/test/rails_app/app/controllers/application_with_fake_engine.rb +0 -30
  191. data/test/rails_app/app/controllers/custom/registrations_controller.rb +0 -31
  192. data/test/rails_app/app/controllers/home_controller.rb +0 -29
  193. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +0 -2
  194. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +0 -2
  195. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +0 -14
  196. data/test/rails_app/app/controllers/users_controller.rb +0 -31
  197. data/test/rails_app/app/helpers/application_helper.rb +0 -3
  198. data/test/rails_app/app/mailers/users/from_proc_mailer.rb +0 -3
  199. data/test/rails_app/app/mailers/users/mailer.rb +0 -3
  200. data/test/rails_app/app/mailers/users/reply_to_mailer.rb +0 -4
  201. data/test/rails_app/app/mongoid/admin.rb +0 -29
  202. data/test/rails_app/app/mongoid/shim.rb +0 -23
  203. data/test/rails_app/app/mongoid/user.rb +0 -39
  204. data/test/rails_app/app/mongoid/user_on_engine.rb +0 -39
  205. data/test/rails_app/app/mongoid/user_on_main_app.rb +0 -39
  206. data/test/rails_app/app/mongoid/user_without_email.rb +0 -33
  207. data/test/rails_app/app/views/admins/index.html.erb +0 -1
  208. data/test/rails_app/app/views/admins/sessions/new.html.erb +0 -2
  209. data/test/rails_app/app/views/home/admin_dashboard.html.erb +0 -1
  210. data/test/rails_app/app/views/home/index.html.erb +0 -1
  211. data/test/rails_app/app/views/home/join.html.erb +0 -1
  212. data/test/rails_app/app/views/home/private.html.erb +0 -1
  213. data/test/rails_app/app/views/home/user_dashboard.html.erb +0 -1
  214. data/test/rails_app/app/views/layouts/application.html.erb +0 -24
  215. data/test/rails_app/app/views/users/edit_form.html.erb +0 -1
  216. data/test/rails_app/app/views/users/index.html.erb +0 -1
  217. data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +0 -1
  218. data/test/rails_app/app/views/users/sessions/new.html.erb +0 -1
  219. data/test/rails_app/bin/bundle +0 -3
  220. data/test/rails_app/bin/rails +0 -4
  221. data/test/rails_app/bin/rake +0 -4
  222. data/test/rails_app/config/application.rb +0 -44
  223. data/test/rails_app/config/boot.rb +0 -20
  224. data/test/rails_app/config/database.yml +0 -18
  225. data/test/rails_app/config/environment.rb +0 -5
  226. data/test/rails_app/config/environments/development.rb +0 -30
  227. data/test/rails_app/config/environments/production.rb +0 -86
  228. data/test/rails_app/config/environments/test.rb +0 -45
  229. data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  230. data/test/rails_app/config/initializers/devise.rb +0 -180
  231. data/test/rails_app/config/initializers/inflections.rb +0 -2
  232. data/test/rails_app/config/initializers/secret_token.rb +0 -3
  233. data/test/rails_app/config/initializers/session_store.rb +0 -1
  234. data/test/rails_app/config/routes.rb +0 -126
  235. data/test/rails_app/config.ru +0 -4
  236. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -75
  237. data/test/rails_app/db/schema.rb +0 -55
  238. data/test/rails_app/lib/shared_admin.rb +0 -21
  239. data/test/rails_app/lib/shared_user.rb +0 -30
  240. data/test/rails_app/lib/shared_user_without_email.rb +0 -26
  241. data/test/rails_app/lib/shared_user_without_omniauth.rb +0 -13
  242. data/test/rails_app/public/404.html +0 -26
  243. data/test/rails_app/public/422.html +0 -26
  244. data/test/rails_app/public/500.html +0 -26
  245. data/test/rails_app/public/favicon.ico +0 -0
  246. data/test/rails_test.rb +0 -9
  247. data/test/routes_test.rb +0 -279
  248. data/test/support/action_controller/record_identifier.rb +0 -10
  249. data/test/support/assertions.rb +0 -28
  250. data/test/support/helpers.rb +0 -77
  251. data/test/support/http_method_compatibility.rb +0 -51
  252. data/test/support/integration.rb +0 -92
  253. data/test/support/locale/en.yml +0 -8
  254. data/test/support/mongoid.yml +0 -6
  255. data/test/support/webrat/integrations/rails.rb +0 -33
  256. data/test/test/controller_helpers_test.rb +0 -186
  257. data/test/test/integration_helpers_test.rb +0 -32
  258. data/test/test_helper.rb +0 -34
  259. data/test/test_models.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0b580a525adc8af746c4f2f2c22f337f5a605bde
4
- data.tar.gz: e39fc8ecd5b3119f79d3f303889d204762d9248c
2
+ SHA256:
3
+ metadata.gz: 7640b97ddd188a63e29076d8d94b0a4ebaecc23aad53b8e608b4b1d029818570
4
+ data.tar.gz: 7e8b512895f0fd73e307bebe494ea3d7d0bd9ecd562b917016b1f7f56d483d2c
5
5
  SHA512:
6
- metadata.gz: 62ee6bfb4250f0d9af472a00f9ed0937dc9f7526acc97e5012c2c930fb15447f449aa881a1382e73d3b38bb68f7b4410b184c4135959b8c6beb369d35e745fce
7
- data.tar.gz: acfb853f1006f573987367481929057a28433fbfab1b731bea10f858fa9343ef85dbb3cdccea3f151389357141a6d2c5425b79419df4ba6926e75161117c90ab
6
+ metadata.gz: b7cd4534d2abb7ba16353d4f41ea63ed0334eccf68c1357dc37c68b51ad90f1a9cb8544e8f90c2249b2067bdfd0b6c19d245562a1eecef2291ea8705143878ec
7
+ data.tar.gz: f9bc9ea3a1dfdf86ab79dc47839c79b07fd5613dddfb40022fa508729dded4971dd30055f6f8b901c6a9182513414750825064db278d7865ae7a4576513c08f7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,206 @@
1
+ ### Unreleased
2
+
3
+ * deprecations
4
+ * Bring back `Devise.activerecord51?` and deprecate it, in order to avoid breakage with some libraries that apparently relied on it.
5
+
6
+ ### 4.9.1 - 2023-03-31
7
+
8
+ * enhancements
9
+ * Allow resource class scopes to override the global configuration for `sign_in_after_reset_password` behaviour. [#5429](https://github.com/heartcombo/devise/pull/5429) [@mattr](https://github.com/mattr)
10
+ * Refactor conditional dirty tracking logic to a centralized module to simplify usage throughout the codebase. [#5575](https://github.com/heartcombo/devise/pull/5575)
11
+ * Improve support for Devise in apps with Active Record and Mongoid ORMs loaded, so it does not incorrectly uses new Active Record dirty tracking APIs with a Mongoid Devise model. [#5576](https://github.com/heartcombo/devise/pull/5576)
12
+
13
+ * bug fixes
14
+ * Failure app will respond with configured `redirect_status` instead of `error_status` if the recall app returns a redirect status (300..399) [#5573](https://github.com/heartcombo/devise/pull/5573)
15
+ * Fix frozen string exception in validatable. [#5563](https://github.com/heartcombo/devise/pull/5563) [#5465](https://github.com/heartcombo/devise/pull/5465) [@mameier](https://github.com/mameier)
16
+
17
+ ### 4.9.0 - 2023-02-17
18
+
19
+ * enhancements
20
+ * Add support for Ruby 3.1/3.2.
21
+ * Add support for Hotwire + Turbo, default in Rails 7+.
22
+ * Devise uses the latest `responders` version (v3.1.0 or higher), which allows configuring the status used for validation error responses (`error_status`) and for redirects after POST/PUT/PATCH/DELETE requests (`redirect_status`). For backwards compatibility, Devise keeps `error_status` as `:ok` which returns a `200 OK` response, and `redirect_status` to `:found` which returns a `302 Found` response, but you can configure it to return `422 Unprocessable Entity` and `303 See Other` respectively, to match the behavior expected by Hotwire/Turbo:
23
+
24
+ ```ruby
25
+ # config/initializers/devise.rb
26
+ Devise.setup do |config|
27
+ # ...
28
+ config.responder.error_status = :unprocessable_entity
29
+ config.responder.redirect_status = :see_other
30
+ # ...
31
+ end
32
+ ```
33
+
34
+ These configs are already generated by default with new apps, and existing apps may opt-in as described above. Trying to set these with an older version of `responders` will issue a warning and have no effect, so please upgrade the `responders` version if you're upgrading Devise for this integration. Note that these defaults may change in future versions of Devise, to better match the Rails + Hotwire/Turbo defaults across the board.
35
+ * If you have a custom responder set on your application and expect it to affect Devise as well, you may need to override the Devise responder entirely with `config.responder = MyApplicationResponder`, so that it uses your custom one. The main reason Devise uses a custom responder is to be able to configure the statuses as described above, but you can also change that config on your own responder if you want. Check the `responders` readme for more info on that.
36
+ * If you have created a custom responder and/or failure app just to customize responses for better Hotwire/Turbo integration, they should no longer be necessary.
37
+ * `:turbo_stream` is now treated as a navigational format, so it works like HTML navigation when using Turbo. Note: if you relied on `:turbo_stream` to be treated as a non-navigational format before, you can reconfigure your `navigational_formats` in the Devise initializer file to exclude it.
38
+ * OmniAuth "Sign in with" links were changed to buttons that generate HTML forms with method=POST, instead of using link + method=POST that required rails-ujs to work. Since rails-ujs is no longer the default for new Rails apps, this allows the OmniAuth buttons to work in any scenario, with or without rails-ujs and/or Turbo. This only affects apps that are using the default `devise/shared/_links.html.erb` partial from Devise with OmniAuth enabled.
39
+ * The "Cancel my account" button was changed to include the `data-turbo-confirm` option, so that it works with both rails-ujs and Turbo by default.
40
+ * Devise does not provide "sign out" links/buttons in its shared views, but if you're using `sign_out_via` with `:delete` (the default), and are using links with `method: :delete`, those need to be updated with `data: { turbo_method: :delete }` instead for Turbo.
41
+ * Check [this upgrade guide](https://github.com/heartcombo/devise/wiki/How-To:-Upgrade-to-Devise-4.9.0-[Hotwire-Turbo-integration]) for more detailed information.
42
+
43
+ ### 4.8.1 - 2021-12-16
44
+
45
+ * enhancements
46
+ * Add support for Rails 7.0. Please note that Turbo integration is not fully supported by Devise yet.
47
+
48
+ ### 4.8.0 - 2021-04-29
49
+
50
+ * enhancements
51
+ * Devise now enables the upgrade of OmniAuth 2+. Previously Devise would raise an error if you'd try to upgrade. Please note that OmniAuth 2 is considered a security upgrade and recommended to everyone. You can read more about the details (and possible necessary changes to your app as part of the upgrade) in [their release notes](https://github.com/omniauth/omniauth/releases/tag/v2.0.0). [Devise's OmniAuth Overview wiki](https://github.com/heartcombo/devise/wiki/OmniAuth:-Overview) was also updated to cover OmniAuth 2.0 requirements.
52
+ - Note that the upgrade required Devise shared links that initiate the OmniAuth flow to be changed to `method: :post`, which is now a requirement for OmniAuth, part of the security improvement. If you have copied and customized the Devise shared links partial to your app, or if you have other links in your app that initiate the OmniAuth flow, they will have to be updated to use `method: :post`, or changed to use buttons (e.g. `button_to`) to work with OmniAuth 2. (if you're using links with `method: :post`, make sure your app has `rails-ujs` or `jquery-ujs` included in order for these links to work properly.)
53
+ - As part of the OmniAuth 2.0 upgrade you might also need to add the [`omniauth-rails_csrf_protection`](https://github.com/cookpad/omniauth-rails_csrf_protection) gem to your app if you don't have it already. (and you don't want to roll your own code to verify requests.) Check the OmniAuth v2 release notes for more info.
54
+ * Introduce `Lockable#reset_failed_attempts!` model method to reset failed attempts counter to 0 after the user signs in.
55
+ - This logic existed inside the lockable warden hook and is triggered automatically after the user signs in. The new model method is an extraction to allow you to override it in the application to implement things like switching to a write database if you're using the new multi-DB infrastructure from Rails for example, similar to how it's already possible with `Trackable#update_tracked_fields!`.
56
+ * Add support for Ruby 3.
57
+ * Add support for Rails 6.1.
58
+ * Move CI to GitHub Actions.
59
+
60
+ * deprecations
61
+ * `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` is deprecated in favor of `Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION` (@hanachin)
62
+
63
+ ### 4.7.3 - 2020-09-20
64
+
65
+ * bug fixes
66
+ * Do not modify `:except` option given to `#serializable_hash`. (by @dpep)
67
+ * Fix thor deprecation when running the devise generator. (by @deivid-rodriguez)
68
+ * Fix hanging tests for streaming controllers using Devise. (by @afn)
69
+
70
+ ### 4.7.2 - 2020-06-10
71
+
72
+ * enhancements
73
+ * Increase default stretches to 12 (by @sergey-alekseev)
74
+ * Ruby 2.7 support (kwarg warnings removed)
75
+
76
+ * bug fixes
77
+ * Generate scoped views with proper scoped errors partial (by @shobhitic)
78
+ * Allow to set scoped `already_authenticated` error messages (by @gurgelrenan)
79
+
80
+ ### 4.7.1 - 2019-09-06
81
+
82
+ * bug fixes
83
+ * Fix an edge case where records with a blank `confirmation_token` could be confirmed (by @tegon)
84
+ * Fix typo inside `update_needs_confirmation` i18n key (by @lslm)
85
+
86
+ ### 4.7.0 - 2019-08-19
87
+
88
+ * enhancements
89
+ * Support Rails 6.0
90
+ * Update CI to rails 6.0.0.beta3 (by @tunnes)
91
+ * refactor method name to be more consistent (by @saiqulhaq)
92
+ * Fix rails 6.0.rc1 email uniqueness validation deprecation warning (by @Vasfed)
93
+
94
+ * bug fixes
95
+ * Add `autocomplete="new-password"` to `password_confirmation` fields (by @ferrl)
96
+ * Fix rails_51_and_up? method for Rails 6.rc1 (by @igorkasyanchuk)
97
+
98
+ ### 4.6.2 - 2019-03-26
99
+
100
+ * bug fixes
101
+ * Revert "Set `encrypted_password` to `nil` when `password` is set to `nil`" since it broke backward compatibility with existing applications. See more on https://github.com/heartcombo/devise/issues/5033#issuecomment-476386275 (by @mracos)
102
+
103
+ ### 4.6.1 - 2019-02-11
104
+
105
+ * bug fixes
106
+ * Check if `root_path` is defined with `#respond_to?` instead of `#present` (by @tegon)
107
+
108
+ ### 4.6.0 - 2019-02-07
109
+
110
+ * enhancements
111
+ * Allow to skip email and password change notifications (by @iorme1)
112
+ * Include the use of `nil` for `allow_unconfirmed_access_for` in the docs (by @joaumg)
113
+ * Ignore useless files into the `.gem` file (by @huacnlee)
114
+ * Explain the code that prevents enumeration attacks inside `Devise::Strategies::DatabaseAuthenticatable` (by @tegon)
115
+ * Refactor the `devise_error_messages!` helper to render a partial (by @prograhamer)
116
+ * Add an option (`Devise.sign_in_after_change_password`) to not automatically sign in a user after changing a password (by @knjko)
117
+
118
+ * bug fixes
119
+ * Fix missing comma in Simple Form generator (by @colinross)
120
+ * Fix error with migration generator in Rails 6 (by @oystersauce8)
121
+ * Set `encrypted_password` to `nil` when `password` is set to `nil` (by @sivagollapalli)
122
+ * Consider whether the request supports flash messages inside `Devise::Controllers::Helpers#is_flashing_format?` (by @colinross)
123
+ * Fix typo inside `Devise::Generators::ControllersGenerator` (by @kopylovvlad)
124
+ * Sanitize parameters inside `Devise::Models::Authenticatable#find_or_initialize_with_errors` (by @rlue)
125
+ * `#after_database_authentication` callback was not called after authentication on password reset (by @kanmaniselvan)
126
+ * Fix corner case when `#confirmation_period_valid?` was called at the same second as `confirmation_sent_at` was set. Mostly true for date types that only have second precisions. (by @stanhu)
127
+ * Fix unclosed `li` tag in `error_messages` partial (by @mracos)
128
+ * Fix Routes issue when devise engine is mounted in another engine on Rails versions lower than 5.1 (by @a-barbieri)
129
+ * Make `#increment_failed_attempts` concurrency safe (by @tegon)
130
+ * Apply Test Helper fix to Rails 6.0 as well as 5.x (by @matthewrudy)
131
+
132
+
133
+ * deprecations
134
+ * The second argument of `DatabaseAuthenticatable`'s `#update_with_password` and `#update_without_password` is deprecated and will be removed in the next major version. It was added to support a feature deprecated in Rails 4, so you can safely remove it from your code. (by @ihatov08)
135
+ * The `DeviseHelper.devise_error_messages!` is deprecated and will be removed in the next major version. Use the `devise/shared/error_messages` partial instead. (by @mracos)
136
+
137
+ ### 4.5.0 - 2018-08-15
138
+
139
+ * enhancements
140
+ * Use `before_action` instead of `before_filter` (by @edenthecat)
141
+ * Allow people to extend devise failure app, through invoking `ActiveSupport.run_load_hooks` once `Devise::FailureApp` is loaded (by @wnm)
142
+ * Use `update` instead of `update_attributes` (by @koic)
143
+ * Split IP resolution from `update_tracked_fields` (by @mckramer)
144
+ * upgrade dependencies for rails and responders (by @lancecarlson)
145
+ * Add `autocomplete="new-password"` to new password fields (by @gssbzn)
146
+ * Add `autocomplete="current-password"` to current password fields (by @gssbzn)
147
+ * Remove redundant `self` from `database_authenticatable` module (by @abhishekkanojia)
148
+ * Update `simple_form` templates with changes from https://github.com/heartcombo/devise/commit/16b3d6d67c7e017d461ea17ed29ea9738dc77e83 and https://github.com/heartcombo/devise/commit/6260c29a867b9a656f1e1557abe347a523178fab (by @gssbzn)
149
+ * Remove `:trackable` from the default modules in the generators, to be more GDPR-friendly (by @fakenine)
150
+
151
+ * bug fixes
152
+ * Use same string on failed login regardless of whether account exists when in paranoid mode (by @TonyMK9068)
153
+ * Fix error when params is not a hash inside `Devise::ParameterSanitizer` (by @b0nn1e)
154
+ * Look for `secret_key_base` inside `Rails.application` (by @gencer)
155
+ * Ensure `Devise::ParameterFilter` does not add missing keys when called with a hash that has a `default` / `default_proc`
156
+ configured (by @joshpencheon)
157
+ * Adds `is_navigational_format?` check to `after_sign_up_path_for` to keep consistency (by @iorme1)
158
+
159
+ ### 4.4.3 - 2018-03-17
160
+
161
+ * bug fixes
162
+ * Fix undefined method `rails5?` for Devise::Test:Module (by @tegon)
163
+ * Fix: secret key was being required to be set inside credentials on Rails 5.2 (by @tegon)
164
+
165
+ ### 4.4.2 - 2018-03-15
166
+
167
+ * enhancements
168
+ * Support for :credentials on Rails v5.2.x. (by @gencer)
169
+ * Improve documentation about the test suite. (by @tegon)
170
+ * Test with Rails 5.2.rc1 on Travis. (by @jcoyne)
171
+ * Allow test with Rails 6. (by @Fudoshiki)
172
+ * Creating a new section for controller configuration on `devise.rb` template (by @Danilo-Araujo-Silva)
173
+
174
+ * bug fixes
175
+ * Preserve content_type for unauthenticated tests (by @gmcnaughton)
176
+ * Check if the resource is persisted in `update_tracked_fields!` instead of performing validations (by @tegon)
177
+ * Revert "Replace log_process_action to append_info_to_payload" (by @tegon)
178
+
179
+ ### 4.4.1 - 2018-01-23
180
+
181
+ * bug fixes
182
+ * Ensure Gemspec is loaded as utf-8. (by @segiddins)
183
+ * Fix `ActiveRecord` check on `Confirmable`. (by @tegon)
184
+ * Fix `signed_in?` docs without running auth hooks. by (@machty)
185
+
186
+ ### 4.4.0 - 2017-12-29
187
+
188
+ * enhancements
189
+ * Add `frozen_string_literal` pragma comment to all Ruby files. (by @pat)
190
+ * Use `set_flash_method!` instead of `set_flash_method` in `Devise::OmniauthCallbacksController#failure`. (by @saichander17)
191
+ * Clarify how `store_location_for` modifies URIs. (by @olivierlacan)
192
+ * Move `failed_attempts` increment into its own function. by (@mobilutz)
193
+ * Add `autocomplete="email"` to email fields. by (@MikeRogers0)
194
+ * Add the ability to change the default migrations path introduced in Rails 5.0.3. (by @alexhifer)
195
+ * Delete unnecessary condition for helper method. (by @davydovanton)
196
+ * Support `id: :uuid` option for migrations. (by @filip373)
197
+
198
+ * bug fixes
199
+ * Fix syntax for MRI 2.5.0. (by @pat)
200
+ * Validations were being ignored on singup in the `Trackable#update_tracked_fields!` method. (by @AshleyFoster)
201
+ * Do not modify options for `#serializable_hash`. (by @guigs)
202
+ * Email confirmations were being sent on sign in/sign out for application using `mongoid` and `mongoid-paperclip` gems. This is because previously we were checking if a model is from Active Record by checking if the method `after_commit` was defined - since `mongoid` doesn' have one - but `mongoid-paperclip` gem does define one, which cause this issue. (by @fjg)
203
+
1
204
  ### 4.3.0 - 2017-05-14
2
205
 
3
206
  * Enhancements
@@ -186,8 +389,8 @@
186
389
  end
187
390
  ```
188
391
 
189
- You can check more examples and explanations on the [README section](/plataformatec/devise#strong-parameters)
392
+ You can check more examples and explanations on the [README section](README.md#strong-parameters)
190
393
  and on the [ParameterSanitizer docs](lib/devise/parameter_sanitizer.rb).
191
394
 
192
- Please check [3-stable](https://github.com/plataformatec/devise/blob/3-stable/CHANGELOG.md)
395
+ Please check [3-stable](https://github.com/heartcombo/devise/blob/3-stable/CHANGELOG.md)
193
396
  for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,5 @@
1
- Copyright 2009-2017 Plataformatec. http://plataformatec.com.br
1
+ Copyright 2020-2023 Rafael França, Leonardo Tegon, Carlos Antônio da Silva.
2
+ Copyright 2009-2019 Plataformatec.
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining
4
5
  a copy of this software and associated documentation files (the