devise 3.0.0 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +351 -0
  3. data/MIT-LICENSE +2 -1
  4. data/README.md +422 -130
  5. data/app/controllers/devise/confirmations_controller.rb +17 -6
  6. data/app/controllers/devise/omniauth_callbacks_controller.rb +12 -6
  7. data/app/controllers/devise/passwords_controller.rb +23 -8
  8. data/app/controllers/devise/registrations_controller.rb +70 -28
  9. data/app/controllers/devise/sessions_controller.rb +49 -17
  10. data/app/controllers/devise/unlocks_controller.rb +11 -4
  11. data/app/controllers/devise_controller.rb +74 -34
  12. data/app/helpers/devise_helper.rb +23 -18
  13. data/app/mailers/devise/mailer.rb +25 -10
  14. data/app/views/devise/confirmations/new.html.erb +9 -5
  15. data/app/views/devise/mailer/confirmation_instructions.html.erb +1 -1
  16. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  17. data/app/views/devise/mailer/password_change.html.erb +3 -0
  18. data/app/views/devise/mailer/reset_password_instructions.html.erb +1 -1
  19. data/app/views/devise/mailer/unlock_instructions.html.erb +1 -1
  20. data/app/views/devise/passwords/edit.html.erb +16 -7
  21. data/app/views/devise/passwords/new.html.erb +9 -5
  22. data/app/views/devise/registrations/edit.html.erb +29 -15
  23. data/app/views/devise/registrations/new.html.erb +20 -9
  24. data/app/views/devise/sessions/new.html.erb +19 -10
  25. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  26. data/app/views/devise/shared/{_links.erb → _links.html.erb} +10 -10
  27. data/app/views/devise/unlocks/new.html.erb +9 -5
  28. data/config/locales/en.yml +26 -20
  29. data/lib/devise/controllers/helpers.rb +122 -125
  30. data/lib/devise/controllers/rememberable.rb +14 -14
  31. data/lib/devise/controllers/scoped_views.rb +3 -1
  32. data/lib/devise/controllers/sign_in_out.rb +121 -0
  33. data/lib/devise/controllers/store_location.rb +76 -0
  34. data/lib/devise/controllers/url_helpers.rb +10 -8
  35. data/lib/devise/delegator.rb +2 -0
  36. data/lib/devise/encryptor.rb +24 -0
  37. data/lib/devise/failure_app.rb +132 -42
  38. data/lib/devise/hooks/activatable.rb +7 -6
  39. data/lib/devise/hooks/csrf_cleaner.rb +9 -0
  40. data/lib/devise/hooks/forgetable.rb +3 -1
  41. data/lib/devise/hooks/lockable.rb +5 -3
  42. data/lib/devise/hooks/proxy.rb +23 -0
  43. data/lib/devise/hooks/rememberable.rb +7 -4
  44. data/lib/devise/hooks/timeoutable.rb +18 -8
  45. data/lib/devise/hooks/trackable.rb +3 -1
  46. data/lib/devise/mailers/helpers.rb +15 -18
  47. data/lib/devise/mapping.rb +9 -3
  48. data/lib/devise/models/authenticatable.rb +102 -80
  49. data/lib/devise/models/confirmable.rb +154 -72
  50. data/lib/devise/models/database_authenticatable.rb +125 -25
  51. data/lib/devise/models/lockable.rb +50 -29
  52. data/lib/devise/models/omniauthable.rb +3 -1
  53. data/lib/devise/models/recoverable.rb +72 -50
  54. data/lib/devise/models/registerable.rb +4 -0
  55. data/lib/devise/models/rememberable.rb +65 -32
  56. data/lib/devise/models/timeoutable.rb +4 -8
  57. data/lib/devise/models/trackable.rb +20 -4
  58. data/lib/devise/models/validatable.rb +16 -9
  59. data/lib/devise/models.rb +6 -13
  60. data/lib/devise/modules.rb +12 -11
  61. data/lib/devise/omniauth/config.rb +2 -0
  62. data/lib/devise/omniauth/url_helpers.rb +14 -5
  63. data/lib/devise/omniauth.rb +4 -5
  64. data/lib/devise/orm/active_record.rb +5 -1
  65. data/lib/devise/orm/mongoid.rb +6 -2
  66. data/lib/devise/parameter_filter.rb +4 -0
  67. data/lib/devise/parameter_sanitizer.rb +144 -34
  68. data/lib/devise/rails/deprecated_constant_accessor.rb +39 -0
  69. data/lib/devise/rails/routes.rb +191 -127
  70. data/lib/devise/rails/warden_compat.rb +2 -1
  71. data/lib/devise/rails.rb +13 -20
  72. data/lib/devise/secret_key_finder.rb +27 -0
  73. data/lib/devise/strategies/authenticatable.rb +21 -22
  74. data/lib/devise/strategies/base.rb +3 -1
  75. data/lib/devise/strategies/database_authenticatable.rb +15 -4
  76. data/lib/devise/strategies/rememberable.rb +15 -3
  77. data/lib/devise/test/controller_helpers.rb +167 -0
  78. data/lib/devise/test/integration_helpers.rb +63 -0
  79. data/lib/devise/test_helpers.rb +7 -123
  80. data/lib/devise/time_inflector.rb +4 -2
  81. data/lib/devise/token_generator.rb +32 -0
  82. data/lib/devise/version.rb +3 -1
  83. data/lib/devise.rb +124 -78
  84. data/lib/generators/active_record/devise_generator.rb +64 -15
  85. data/lib/generators/active_record/templates/migration.rb +9 -8
  86. data/lib/generators/active_record/templates/migration_existing.rb +9 -8
  87. data/lib/generators/devise/controllers_generator.rb +46 -0
  88. data/lib/generators/devise/devise_generator.rb +10 -6
  89. data/lib/generators/devise/install_generator.rb +19 -1
  90. data/lib/generators/devise/orm_helpers.rb +17 -9
  91. data/lib/generators/devise/views_generator.rb +51 -28
  92. data/lib/generators/mongoid/devise_generator.rb +24 -24
  93. data/lib/generators/templates/README +13 -12
  94. data/lib/generators/templates/controllers/README +14 -0
  95. data/lib/generators/templates/controllers/confirmations_controller.rb +30 -0
  96. data/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +30 -0
  97. data/lib/generators/templates/controllers/passwords_controller.rb +34 -0
  98. data/lib/generators/templates/controllers/registrations_controller.rb +62 -0
  99. data/lib/generators/templates/controllers/sessions_controller.rb +27 -0
  100. data/lib/generators/templates/controllers/unlocks_controller.rb +30 -0
  101. data/lib/generators/templates/devise.rb +118 -53
  102. data/lib/generators/templates/markerb/confirmation_instructions.markerb +1 -1
  103. data/lib/generators/templates/markerb/email_changed.markerb +7 -0
  104. data/lib/generators/templates/markerb/password_change.markerb +3 -0
  105. data/lib/generators/templates/markerb/reset_password_instructions.markerb +1 -1
  106. data/lib/generators/templates/markerb/unlock_instructions.markerb +1 -1
  107. data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +6 -2
  108. data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +12 -4
  109. data/lib/generators/templates/simple_form_for/passwords/new.html.erb +5 -2
  110. data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +14 -6
  111. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +12 -4
  112. data/lib/generators/templates/simple_form_for/sessions/new.html.erb +11 -6
  113. data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +5 -2
  114. metadata +73 -294
  115. data/.gitignore +0 -10
  116. data/.travis.yml +0 -20
  117. data/.yardopts +0 -9
  118. data/CHANGELOG.rdoc +0 -941
  119. data/CONTRIBUTING.md +0 -14
  120. data/Gemfile +0 -31
  121. data/Gemfile.lock +0 -159
  122. data/Rakefile +0 -35
  123. data/app/views/devise/_links.erb +0 -3
  124. data/devise.gemspec +0 -26
  125. data/devise.png +0 -0
  126. data/gemfiles/Gemfile.rails-3.2.x +0 -31
  127. data/gemfiles/Gemfile.rails-3.2.x.lock +0 -156
  128. data/lib/devise/models/token_authenticatable.rb +0 -89
  129. data/lib/devise/strategies/token_authenticatable.rb +0 -91
  130. data/test/controllers/custom_strategy_test.rb +0 -62
  131. data/test/controllers/helpers_test.rb +0 -253
  132. data/test/controllers/internal_helpers_test.rb +0 -120
  133. data/test/controllers/passwords_controller_test.rb +0 -32
  134. data/test/controllers/sessions_controller_test.rb +0 -99
  135. data/test/controllers/url_helpers_test.rb +0 -59
  136. data/test/delegator_test.rb +0 -19
  137. data/test/devise_test.rb +0 -83
  138. data/test/failure_app_test.rb +0 -221
  139. data/test/generators/active_record_generator_test.rb +0 -73
  140. data/test/generators/devise_generator_test.rb +0 -39
  141. data/test/generators/install_generator_test.rb +0 -13
  142. data/test/generators/mongoid_generator_test.rb +0 -23
  143. data/test/generators/views_generator_test.rb +0 -67
  144. data/test/helpers/devise_helper_test.rb +0 -51
  145. data/test/integration/authenticatable_test.rb +0 -699
  146. data/test/integration/confirmable_test.rb +0 -299
  147. data/test/integration/database_authenticatable_test.rb +0 -84
  148. data/test/integration/http_authenticatable_test.rb +0 -115
  149. data/test/integration/lockable_test.rb +0 -242
  150. data/test/integration/omniauthable_test.rb +0 -133
  151. data/test/integration/recoverable_test.rb +0 -335
  152. data/test/integration/registerable_test.rb +0 -349
  153. data/test/integration/rememberable_test.rb +0 -165
  154. data/test/integration/timeoutable_test.rb +0 -150
  155. data/test/integration/token_authenticatable_test.rb +0 -205
  156. data/test/integration/trackable_test.rb +0 -92
  157. data/test/mailers/confirmation_instructions_test.rb +0 -111
  158. data/test/mailers/reset_password_instructions_test.rb +0 -92
  159. data/test/mailers/unlock_instructions_test.rb +0 -87
  160. data/test/mapping_test.rb +0 -127
  161. data/test/models/authenticatable_test.rb +0 -13
  162. data/test/models/confirmable_test.rb +0 -452
  163. data/test/models/database_authenticatable_test.rb +0 -226
  164. data/test/models/lockable_test.rb +0 -282
  165. data/test/models/omniauthable_test.rb +0 -7
  166. data/test/models/recoverable_test.rb +0 -222
  167. data/test/models/registerable_test.rb +0 -7
  168. data/test/models/rememberable_test.rb +0 -175
  169. data/test/models/serializable_test.rb +0 -49
  170. data/test/models/timeoutable_test.rb +0 -46
  171. data/test/models/token_authenticatable_test.rb +0 -55
  172. data/test/models/trackable_test.rb +0 -13
  173. data/test/models/validatable_test.rb +0 -127
  174. data/test/models_test.rb +0 -163
  175. data/test/omniauth/config_test.rb +0 -57
  176. data/test/omniauth/url_helpers_test.rb +0 -54
  177. data/test/orm/active_record.rb +0 -10
  178. data/test/orm/mongoid.rb +0 -13
  179. data/test/parameter_sanitizer_test.rb +0 -58
  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 -6
  184. data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -6
  185. data/test/rails_app/app/controllers/admins_controller.rb +0 -11
  186. data/test/rails_app/app/controllers/application_controller.rb +0 -9
  187. data/test/rails_app/app/controllers/home_controller.rb +0 -25
  188. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +0 -2
  189. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +0 -2
  190. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +0 -14
  191. data/test/rails_app/app/controllers/users_controller.rb +0 -31
  192. data/test/rails_app/app/helpers/application_helper.rb +0 -3
  193. data/test/rails_app/app/mailers/users/mailer.rb +0 -12
  194. data/test/rails_app/app/mongoid/admin.rb +0 -29
  195. data/test/rails_app/app/mongoid/shim.rb +0 -23
  196. data/test/rails_app/app/mongoid/user.rb +0 -42
  197. data/test/rails_app/app/views/admins/index.html.erb +0 -1
  198. data/test/rails_app/app/views/admins/sessions/new.html.erb +0 -2
  199. data/test/rails_app/app/views/home/admin_dashboard.html.erb +0 -1
  200. data/test/rails_app/app/views/home/index.html.erb +0 -1
  201. data/test/rails_app/app/views/home/join.html.erb +0 -1
  202. data/test/rails_app/app/views/home/private.html.erb +0 -1
  203. data/test/rails_app/app/views/home/user_dashboard.html.erb +0 -1
  204. data/test/rails_app/app/views/layouts/application.html.erb +0 -24
  205. data/test/rails_app/app/views/users/edit_form.html.erb +0 -1
  206. data/test/rails_app/app/views/users/index.html.erb +0 -1
  207. data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +0 -1
  208. data/test/rails_app/app/views/users/sessions/new.html.erb +0 -1
  209. data/test/rails_app/bin/bundle +0 -3
  210. data/test/rails_app/bin/rails +0 -4
  211. data/test/rails_app/bin/rake +0 -4
  212. data/test/rails_app/config/application.rb +0 -40
  213. data/test/rails_app/config/boot.rb +0 -8
  214. data/test/rails_app/config/database.yml +0 -18
  215. data/test/rails_app/config/environment.rb +0 -5
  216. data/test/rails_app/config/environments/development.rb +0 -34
  217. data/test/rails_app/config/environments/production.rb +0 -84
  218. data/test/rails_app/config/environments/test.rb +0 -36
  219. data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  220. data/test/rails_app/config/initializers/devise.rb +0 -178
  221. data/test/rails_app/config/initializers/inflections.rb +0 -2
  222. data/test/rails_app/config/initializers/secret_token.rb +0 -8
  223. data/test/rails_app/config/initializers/session_store.rb +0 -1
  224. data/test/rails_app/config/routes.rb +0 -104
  225. data/test/rails_app/config.ru +0 -4
  226. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -74
  227. data/test/rails_app/db/schema.rb +0 -52
  228. data/test/rails_app/lib/shared_admin.rb +0 -14
  229. data/test/rails_app/lib/shared_user.rb +0 -25
  230. data/test/rails_app/public/404.html +0 -26
  231. data/test/rails_app/public/422.html +0 -26
  232. data/test/rails_app/public/500.html +0 -26
  233. data/test/rails_app/public/favicon.ico +0 -0
  234. data/test/routes_test.rb +0 -250
  235. data/test/support/assertions.rb +0 -40
  236. data/test/support/helpers.rb +0 -91
  237. data/test/support/integration.rb +0 -92
  238. data/test/support/locale/en.yml +0 -4
  239. data/test/support/webrat/integrations/rails.rb +0 -24
  240. data/test/test_helper.rb +0 -34
  241. data/test/test_helpers_test.rb +0 -151
  242. data/test/test_models.rb +0 -26
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 197ce185bf22b8dc45c17a615895b60e6b788360113c37d99a116db868197309
4
+ data.tar.gz: 8e3fa67c5bcd6c05ac3011e0b35f0cda57596ae74c2affceab84cab1da3aeb58
5
+ SHA512:
6
+ metadata.gz: 8d3f76d9e898d36dc6eb4db5d5b098b76d339aeadac014c772b7097dc6a730a7577049bd00ea7a073beead47454edb91d24fe73b50e90af3555cc5e83886902f
7
+ data.tar.gz: 84cbafa77c70de3c204dfdf19e4ce53ac05796eaf959bba4d4909d0c91686baa6da61f732e13bce0892d8932af375d2b81340f6bd1047384f15325f8a24011e0
data/CHANGELOG.md ADDED
@@ -0,0 +1,351 @@
1
+ ### unreleased
2
+
3
+ ### 4.8.0 - 2021-04-29
4
+
5
+ * enhancements
6
+ * 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.
7
+ - 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.)
8
+ - 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.
9
+ * Introduce `Lockable#reset_failed_attempts!` model method to reset failed attempts counter to 0 after the user signs in.
10
+ - 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!`.
11
+ * Add support for Ruby 3.
12
+ * Add support for Rails 6.1.
13
+ * Move CI to GitHub Actions.
14
+
15
+ * deprecations
16
+ * `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` is deprecated in favor of `Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION` (@hanachin)
17
+
18
+ ### 4.7.3 - 2020-09-20
19
+
20
+ * bug fixes
21
+ * Do not modify `:except` option given to `#serializable_hash`. (by @dpep)
22
+ * Fix thor deprecation when running the devise generator. (by @deivid-rodriguez)
23
+ * Fix hanging tests for streaming controllers using Devise. (by @afn)
24
+
25
+ ### 4.7.2 - 2020-06-10
26
+
27
+ * enhancements
28
+ * Increase default stretches to 12 (by @sergey-alekseev)
29
+ * Ruby 2.7 support (kwarg warnings removed)
30
+
31
+ * bug fixes
32
+ * Generate scoped views with proper scoped errors partial (by @shobhitic)
33
+ * Allow to set scoped `already_authenticated` error messages (by @gurgelrenan)
34
+
35
+ ### 4.7.1 - 2019-09-06
36
+
37
+ * bug fixes
38
+ * Fix an edge case where records with a blank `confirmation_token` could be confirmed (by @tegon)
39
+ * Fix typo inside `update_needs_confirmation` i18n key (by @lslm)
40
+
41
+ ### 4.7.0 - 2019-08-19
42
+
43
+ * enhancements
44
+ * Support Rails 6.0
45
+ * Update CI to rails 6.0.0.beta3 (by @tunnes)
46
+ * refactor method name to be more consistent (by @saiqulhaq)
47
+ * Fix rails 6.0.rc1 email uniqueness validation deprecation warning (by @Vasfed)
48
+
49
+ * bug fixes
50
+ * Add `autocomplete="new-password"` to `password_confirmation` fields (by @ferrl)
51
+ * Fix rails_51_and_up? method for Rails 6.rc1 (by @igorkasyanchuk)
52
+
53
+ ### 4.6.2 - 2019-03-26
54
+
55
+ * bug fixes
56
+ * 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)
57
+
58
+ ### 4.6.1 - 2019-02-11
59
+
60
+ * bug fixes
61
+ * Check if `root_path` is defined with `#respond_to?` instead of `#present` (by @tegon)
62
+
63
+ ### 4.6.0 - 2019-02-07
64
+
65
+ * enhancements
66
+ * Allow to skip email and password change notifications (by @iorme1)
67
+ * Include the use of `nil` for `allow_unconfirmed_access_for` in the docs (by @joaumg)
68
+ * Ignore useless files into the `.gem` file (by @huacnlee)
69
+ * Explain the code that prevents enumeration attacks inside `Devise::Strategies::DatabaseAuthenticatable` (by @tegon)
70
+ * Refactor the `devise_error_messages!` helper to render a partial (by @prograhamer)
71
+ * Add an option (`Devise.sign_in_after_change_password`) to not automatically sign in a user after changing a password (by @knjko)
72
+
73
+ * bug fixes
74
+ * Fix missing comma in Simple Form generator (by @colinross)
75
+ * Fix error with migration generator in Rails 6 (by @oystersauce8)
76
+ * Set `encrypted_password` to `nil` when `password` is set to `nil` (by @sivagollapalli)
77
+ * Consider whether the request supports flash messages inside `Devise::Controllers::Helpers#is_flashing_format?` (by @colinross)
78
+ * Fix typo inside `Devise::Generators::ControllersGenerator` (by @kopylovvlad)
79
+ * Sanitize parameters inside `Devise::Models::Authenticatable#find_or_initialize_with_errors` (by @rlue)
80
+ * `#after_database_authentication` callback was not called after authentication on password reset (by @kanmaniselvan)
81
+ * 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)
82
+ * Fix unclosed `li` tag in `error_messages` partial (by @mracos)
83
+ * Fix Routes issue when devise engine is mounted in another engine on Rails versions lower than 5.1 (by @a-barbieri)
84
+ * Make `#increment_failed_attempts` concurrency safe (by @tegon)
85
+ * Apply Test Helper fix to Rails 6.0 as well as 5.x (by @matthewrudy)
86
+
87
+
88
+ * deprecations
89
+ * 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)
90
+ * 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)
91
+
92
+ ### 4.5.0 - 2018-08-15
93
+
94
+ * enhancements
95
+ * Use `before_action` instead of `before_filter` (by @edenthecat)
96
+ * Allow people to extend devise failure app, through invoking `ActiveSupport.run_load_hooks` once `Devise::FailureApp` is loaded (by @wnm)
97
+ * Use `update` instead of `update_attributes` (by @koic)
98
+ * Split IP resolution from `update_tracked_fields` (by @mckramer)
99
+ * upgrade dependencies for rails and responders (by @lancecarlson)
100
+ * Add `autocomplete="new-password"` to new password fields (by @gssbzn)
101
+ * Add `autocomplete="current-password"` to current password fields (by @gssbzn)
102
+ * Remove redundant `self` from `database_authenticatable` module (by @abhishekkanojia)
103
+ * Update `simple_form` templates with changes from https://github.com/heartcombo/devise/commit/16b3d6d67c7e017d461ea17ed29ea9738dc77e83 and https://github.com/heartcombo/devise/commit/6260c29a867b9a656f1e1557abe347a523178fab (by @gssbzn)
104
+ * Remove `:trackable` from the default modules in the generators, to be more GDPR-friendly (by @fakenine)
105
+
106
+ * bug fixes
107
+ * Use same string on failed login regardless of whether account exists when in paranoid mode (by @TonyMK9068)
108
+ * Fix error when params is not a hash inside `Devise::ParameterSanitizer` (by @b0nn1e)
109
+ * Look for `secret_key_base` inside `Rails.application` (by @gencer)
110
+ * Ensure `Devise::ParameterFilter` does not add missing keys when called with a hash that has a `default` / `default_proc`
111
+ configured (by @joshpencheon)
112
+ * Adds `is_navigational_format?` check to `after_sign_up_path_for` to keep consistency (by @iorme1)
113
+
114
+ ### 4.4.3 - 2018-03-17
115
+
116
+ * bug fixes
117
+ * Fix undefined method `rails5?` for Devise::Test:Module (by @tegon)
118
+ * Fix: secret key was being required to be set inside credentials on Rails 5.2 (by @tegon)
119
+
120
+ ### 4.4.2 - 2018-03-15
121
+
122
+ * enhancements
123
+ * Support for :credentials on Rails v5.2.x. (by @gencer)
124
+ * Improve documentation about the test suite. (by @tegon)
125
+ * Test with Rails 5.2.rc1 on Travis. (by @jcoyne)
126
+ * Allow test with Rails 6. (by @Fudoshiki)
127
+ * Creating a new section for controller configuration on `devise.rb` template (by @Danilo-Araujo-Silva)
128
+
129
+ * bug fixes
130
+ * Preserve content_type for unauthenticated tests (by @gmcnaughton)
131
+ * Check if the resource is persisted in `update_tracked_fields!` instead of performing validations (by @tegon)
132
+ * Revert "Replace log_process_action to append_info_to_payload" (by @tegon)
133
+
134
+ ### 4.4.1 - 2018-01-23
135
+
136
+ * bug fixes
137
+ * Ensure Gemspec is loaded as utf-8. (by @segiddins)
138
+ * Fix `ActiveRecord` check on `Confirmable`. (by @tegon)
139
+ * Fix `signed_in?` docs without running auth hooks. by (@machty)
140
+
141
+ ### 4.4.0 - 2017-12-29
142
+
143
+ * enhancements
144
+ * Add `frozen_string_literal` pragma comment to all Ruby files. (by @pat)
145
+ * Use `set_flash_method!` instead of `set_flash_method` in `Devise::OmniauthCallbacksController#failure`. (by @saichander17)
146
+ * Clarify how `store_location_for` modifies URIs. (by @olivierlacan)
147
+ * Move `failed_attempts` increment into its own function. by (@mobilutz)
148
+ * Add `autocomplete="email"` to email fields. by (@MikeRogers0)
149
+ * Add the ability to change the default migrations path introduced in Rails 5.0.3. (by @alexhifer)
150
+ * Delete unnecessary condition for helper method. (by @davydovanton)
151
+ * Support `id: :uuid` option for migrations. (by @filip373)
152
+
153
+ * bug fixes
154
+ * Fix syntax for MRI 2.5.0. (by @pat)
155
+ * Validations were being ignored on singup in the `Trackable#update_tracked_fields!` method. (by @AshleyFoster)
156
+ * Do not modify options for `#serializable_hash`. (by @guigs)
157
+ * 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)
158
+
159
+ ### 4.3.0 - 2017-05-14
160
+
161
+ * Enhancements
162
+ * Dependency support added for Rails 5.1.x.
163
+
164
+ ### 4.2.1 - 2017-03-15
165
+
166
+ * removals
167
+ * `Devise::Mailer#scope_name` and `Devise::Mailer#resource` are now protected
168
+ methods instead of public.
169
+ * bug fixes
170
+ * Attempt to reset password without the password field in the request now results in a `:blank` validation error.
171
+ Before this change, Devise would accept the reset password request and log the user in, without validating/changing
172
+ the password. (by @victor-am)
173
+ * Confirmation links now expire based on UTC time, working properly when using different timezones. (by @jjuliano)
174
+ * enhancements
175
+ * Notify the original email when it is changed with a new `Devise.send_email_changed_notification` setting.
176
+ When using `reconfirmable`, the notification will be sent right away instead of when the unconfirmed email is confirmed.
177
+ (original change by @ethirajsrinivasan)
178
+
179
+ ### 4.2.0 - 2016-07-01
180
+
181
+ * removals
182
+ * Remove the deprecated `Devise::ParameterSanitizer` API from Devise 3.
183
+ Please use the `#permit` and `#sanitize` methods over `#for`.
184
+ * Remove the deprecated OmniAuth URL helpers. Use the fully qualified helpers
185
+ (`user_facebook_omniauth_authorize_path`) over the scope based helpers
186
+ ( `user_omniauth_authorize_path(:facebook)`).
187
+ * Remove the `Devise.bcrypt` method, use `Devise::Encryptor.digest` instead.
188
+ * Remove the `Devise::Models::Confirmable#confirm!` method, use `confirm` instead.
189
+ * Remove the `Devise::Models::Recoverable#reset_password!` method, use `reset_password` instead.
190
+ * Remove the `Devise::Models::Recoverable#after_password_reset` method.
191
+ * bug fixes
192
+ * Fix an `ActionDispatch::IllegalStateError` when testing controllers with Rails 5 rc 2(by @hamadata).
193
+ * Use `ActiveSupport.on_load` hooks to include Devise on `ActiveRecord` and `Mongoid`,
194
+ avoiding autoloading these constants too soon (by @lucasmazza, @rafaelfranca).
195
+ * enhancements
196
+ * Display the minimum password length on `registrations/edit` view (by @Yanchek99).
197
+ * You can disable Devise's routes reloading on boot by through the `reload_routes = false` config.
198
+ This can reduce the time taken to boot the application but it might trigger
199
+ some errors if you application (mostly your controllers) requires that
200
+ Devise mappings be loaded during boot time (by @sidonath).
201
+ * Added `Devise::Test::IntegrationHelpers` to bypass the sign in process using
202
+ Warden test API (by @lucasmazza).
203
+ * Define `inspect` in `Devise::Models::Authenticatable` to help ensure password hashes
204
+ aren't included in exceptions or otherwise accidentally serialized (by @tkrajcar).
205
+ * Add missing support of `Rails.application.config.action_controller.relative_url_root` (by @kosdiamantis).
206
+ * deprecations
207
+ * `Devise::TestHelpers` is deprecated in favor of `Devise::Test::ControllerHelpers`
208
+ (by @lucasmazza).
209
+ * The `sign_in` test helper has changed to use keyword arguments when passing
210
+ a scope. `sign_in :admin, users(:alice)` should be rewritten as
211
+ `sign_in users(:alice), scope: :admin` (by @lucasmazza).
212
+ * The option `bypass` of `Devise::Controllers::SignInOut#sign_in` method is
213
+ deprecated in favor of `Devise::Controllers::SignInOut#bypass_sign_in`
214
+ method (by @ulissesalmeida).
215
+
216
+ ### 4.1.1 - 2016-05-15
217
+
218
+ * bug fixes
219
+ * Fix overwriting the remember_token when a valid one already exists (by @ralinchimev).
220
+
221
+ ### 4.1.0
222
+
223
+ * bug fixes
224
+ * Fix race condition of sending the confirmation instructions e-mail using background jobs.
225
+ Using the previous `after_create` callback, the e-mail can be sent before
226
+ the record be committed on database, generating a `ActiveRecord::NotFound` error.
227
+ Now the confirmation e-mail will be only sent after the database commit,
228
+ using the `after_commit` callback.
229
+ It may break your test suite on Rails 4 if you are testing the sent e-mails
230
+ or enqueued jobs using transactional fixtures enabled or `DatabaseCleaner` with `transaction` strategy.
231
+ You can easily fix your test suite using the gem
232
+ [test_after_commit](https://github.com/grosser/test_after_commit). For example, put in your Gemfile:
233
+
234
+ ```ruby
235
+ gem 'test_after_commit', :group => :test
236
+ ```
237
+
238
+ On Rails 5 `after_commit` callbacks are triggered even using transactional
239
+ fixtures, then this fix will not break your test suite. If you are using `DatabaseCleaner` with the `deletion` or `truncation` strategies it may not break your tests. (by @allenwq)
240
+ * Fix strategy checking in `Lockable#unlock_strategy_enabled?` for `:none` and
241
+ `:undefined` strategies. (by @f3ndot)
242
+ * features
243
+ * Humanize authentication keys in failure flash message (by @byzg)
244
+ When you are configuring the translations of `devise.failure.invalid`, the
245
+ `authentication_keys` is translated now.
246
+ * deprecations
247
+ * Remove code supporting old session serialization format (by @fphilipe).
248
+ * Now the `email_regexp` default uses a more permissive regex:
249
+ `/\A[^@\s]+@[^@\s]+\z/` (by @kimgb)
250
+ * Now the `strip_whitespace_keys` default is `[:email]` (by @ulissesalmeida)
251
+ * Now the `reconfirmable` default is `true` (by @ulissesalmeida)
252
+ * Now the `skip_session_storage` default is `[:http_auth]` (by @ulissesalmeida)
253
+ * Now the `sign_out_via` default is `:delete` (by @ulissesalmeida)
254
+ * improvements
255
+ * Avoids extra computation of friendly token for confirmation token (by @sbc100)
256
+
257
+ ### 4.0.3 - 2016-05-15
258
+
259
+ * bug fixes
260
+ * Fix overwriting the remember_token when a valid one already exists (by @ralinchimev).
261
+
262
+ ### 4.0.2 - 2016-05-02
263
+
264
+ * bug fixes
265
+ * Fix strategy checking in `Lockable#unlock_strategy_enabled?` for `:none`
266
+ and `:undefined` strategies. (by @f3ndot)
267
+
268
+ ### 4.0.1 - 2016-04-25
269
+
270
+ * bug fixes
271
+ * Fix the e-mail confirmation instructions send when a user updates the email
272
+ address from nil. (by @lmduc)
273
+ * Remove unnecessary `attribute_will_change!` call. (by @cadejscroggins)
274
+ * Consistent `permit!` check. (by @ulissesalmeida)
275
+
276
+ ### 4.0.0 - 2016-04-18
277
+
278
+ * bug fixes
279
+ * Fix the `extend_remember_period` configuration. When set to `false` it does
280
+ not update the cookie expiration anymore.(by @ulissesalmeida)
281
+
282
+ * deprecations
283
+ * Added a warning of default value change in Devise 4.1 for users that uses
284
+ the the default configuration of the following configurations: (by @ulissesalmeida)
285
+ * `strip_whitespace_keys` - The default will be `[:email]`.
286
+ * `skip_session_storage` - The default will be `[:http_auth]`.
287
+ * `sign_out_via` - The default will be `:delete`.
288
+ * `reconfirmable` - The default will be `true`.
289
+ * `email_regexp` - The default will be `/\A[^@\s]+@[^@\s]+\z/`.
290
+ * Removed deprecated argument of `Devise::Models::Rememberable#remember_me!` (by @ulissesalmeida)
291
+ * Removed deprecated private method Devise::Controllers::Helpers#expire_session_data_after_sign_in!
292
+ (by @bogdanvlviv)
293
+
294
+ ### 4.0.0.rc2 - 2016-03-09
295
+
296
+ * enhancements
297
+ * Introduced `DeviseController#set_flash_message!` for conditional flash
298
+ messages setting to reduce complexity.
299
+ * `rails g devise:install` will fail if the app does not have a ORM configured
300
+ (by @arjunsharma)
301
+ * Support to Rails 5 versioned migrations added.
302
+
303
+ * deprecations
304
+ * omniauth routes are no longer defined with a wildcard `:provider` parameter,
305
+ and provider specific routes are defined instead, so route helpers like `user_omniauth_authorize_path(:github)` are deprecated in favor of `user_github_omniauth_authorize_path`.
306
+ You can still use `omniauth_authorize_path(:user, :github)` if you need to
307
+ call the helpers dynamically.
308
+
309
+ ### 4.0.0.rc1 - 2016-02-01
310
+
311
+ * Support added to Rails 5 (by @twalpole).
312
+ * Devise no longer supports Rails 3.2 and 4.0.
313
+ * Devise no longer supports Ruby 1.9 and 2.0.
314
+
315
+ * deprecations
316
+ * The `devise_parameter_sanitize` API has changed:
317
+ The `for` method was deprecated in favor of `permit`:
318
+
319
+ ```ruby
320
+ def configure_permitted_parameters
321
+ devise_parameter_sanitizer.for(:sign_up) << :subscribe_newsletter
322
+ # Should become the following.
323
+ devise_parameter_sanitizer.permit(:sign_up, keys: [:subscribe_newsletter])
324
+ end
325
+ ```
326
+
327
+ The customization through instance methods on the sanitizer implementation
328
+ should be done through it's `initialize` method:
329
+
330
+ ```ruby
331
+ class User::ParameterSanitizer < Devise::ParameterSanitizer
332
+ def sign_up
333
+ default_params.permit(:username, :email)
334
+ end
335
+ end
336
+
337
+ # The `sign_up` method can be a `permit` call on the sanitizer `initialize`.
338
+
339
+ class User::ParameterSanitizer < Devise::ParameterSanitizer
340
+ def initialize(*)
341
+ super
342
+ permit(:sign_up, keys: [:username, :email])
343
+ end
344
+ end
345
+ ```
346
+
347
+ You can check more examples and explanations on the [README section](README.md#strong-parameters)
348
+ and on the [ParameterSanitizer docs](lib/devise/parameter_sanitizer.rb).
349
+
350
+ Please check [3-stable](https://github.com/heartcombo/devise/blob/3-stable/CHANGELOG.md)
351
+ for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,5 @@
1
- Copyright 2009-2013 Plataformatec. http://plataformatec.com.br
1
+ Copyright 2020 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