devise 3.5.3 → 4.7.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 (256) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +256 -1099
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +254 -67
  5. data/app/controllers/devise/confirmations_controller.rb +3 -1
  6. data/app/controllers/devise/omniauth_callbacks_controller.rb +8 -6
  7. data/app/controllers/devise/passwords_controller.rb +7 -4
  8. data/app/controllers/devise/registrations_controller.rb +39 -18
  9. data/app/controllers/devise/sessions_controller.rb +9 -7
  10. data/app/controllers/devise/unlocks_controller.rb +4 -2
  11. data/app/controllers/devise_controller.rb +23 -10
  12. data/app/helpers/devise_helper.rb +12 -19
  13. data/app/mailers/devise/mailer.rb +6 -0
  14. data/app/views/devise/confirmations/new.html.erb +2 -2
  15. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  16. data/app/views/devise/passwords/edit.html.erb +3 -3
  17. data/app/views/devise/passwords/new.html.erb +2 -2
  18. data/app/views/devise/registrations/edit.html.erb +9 -5
  19. data/app/views/devise/registrations/new.html.erb +4 -4
  20. data/app/views/devise/sessions/new.html.erb +4 -4
  21. data/app/views/devise/shared/_error_messages.html.erb +15 -0
  22. data/app/views/devise/shared/_links.html.erb +7 -7
  23. data/app/views/devise/unlocks/new.html.erb +2 -2
  24. data/config/locales/en.yml +4 -1
  25. data/lib/devise/controllers/helpers.rb +23 -20
  26. data/lib/devise/controllers/rememberable.rb +11 -2
  27. data/lib/devise/controllers/scoped_views.rb +2 -0
  28. data/lib/devise/controllers/sign_in_out.rb +34 -11
  29. data/lib/devise/controllers/store_location.rb +25 -7
  30. data/lib/devise/controllers/url_helpers.rb +2 -0
  31. data/lib/devise/delegator.rb +2 -0
  32. data/lib/devise/encryptor.rb +6 -4
  33. data/lib/devise/failure_app.rb +75 -37
  34. data/lib/devise/hooks/activatable.rb +2 -0
  35. data/lib/devise/hooks/csrf_cleaner.rb +2 -0
  36. data/lib/devise/hooks/forgetable.rb +2 -0
  37. data/lib/devise/hooks/lockable.rb +6 -1
  38. data/lib/devise/hooks/proxy.rb +3 -1
  39. data/lib/devise/hooks/rememberable.rb +2 -0
  40. data/lib/devise/hooks/timeoutable.rb +5 -2
  41. data/lib/devise/hooks/trackable.rb +2 -0
  42. data/lib/devise/mailers/helpers.rb +7 -4
  43. data/lib/devise/mapping.rb +2 -0
  44. data/lib/devise/models/authenticatable.rb +51 -26
  45. data/lib/devise/models/confirmable.rb +89 -27
  46. data/lib/devise/models/database_authenticatable.rb +88 -21
  47. data/lib/devise/models/lockable.rb +15 -5
  48. data/lib/devise/models/omniauthable.rb +2 -0
  49. data/lib/devise/models/recoverable.rb +32 -20
  50. data/lib/devise/models/registerable.rb +4 -0
  51. data/lib/devise/models/rememberable.rb +42 -26
  52. data/lib/devise/models/timeoutable.rb +2 -6
  53. data/lib/devise/models/trackable.rb +15 -1
  54. data/lib/devise/models/validatable.rb +10 -3
  55. data/lib/devise/models.rb +3 -1
  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 +14 -5
  59. data/lib/devise/omniauth.rb +2 -0
  60. data/lib/devise/orm/active_record.rb +5 -1
  61. data/lib/devise/orm/mongoid.rb +6 -2
  62. data/lib/devise/parameter_filter.rb +4 -0
  63. data/lib/devise/parameter_sanitizer.rb +139 -65
  64. data/lib/devise/rails/routes.rb +44 -33
  65. data/lib/devise/rails/warden_compat.rb +3 -10
  66. data/lib/devise/rails.rb +7 -16
  67. data/lib/devise/secret_key_finder.rb +27 -0
  68. data/lib/devise/strategies/authenticatable.rb +3 -1
  69. data/lib/devise/strategies/base.rb +2 -0
  70. data/lib/devise/strategies/database_authenticatable.rb +11 -4
  71. data/lib/devise/strategies/rememberable.rb +5 -6
  72. data/lib/devise/test/controller_helpers.rb +165 -0
  73. data/lib/devise/test/integration_helpers.rb +63 -0
  74. data/lib/devise/test_helpers.rb +7 -124
  75. data/lib/devise/time_inflector.rb +2 -0
  76. data/lib/devise/token_generator.rb +3 -41
  77. data/lib/devise/version.rb +3 -1
  78. data/lib/devise.rb +61 -40
  79. data/lib/generators/active_record/devise_generator.rb +29 -10
  80. data/lib/generators/active_record/templates/migration.rb +4 -2
  81. data/lib/generators/active_record/templates/migration_existing.rb +4 -2
  82. data/lib/generators/devise/controllers_generator.rb +3 -1
  83. data/lib/generators/devise/devise_generator.rb +4 -2
  84. data/lib/generators/devise/install_generator.rb +17 -0
  85. data/lib/generators/devise/orm_helpers.rb +10 -21
  86. data/lib/generators/devise/views_generator.rb +7 -8
  87. data/lib/generators/mongoid/devise_generator.rb +7 -5
  88. data/lib/generators/templates/README +1 -8
  89. data/lib/generators/templates/controllers/confirmations_controller.rb +2 -0
  90. data/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +2 -0
  91. data/lib/generators/templates/controllers/passwords_controller.rb +2 -0
  92. data/lib/generators/templates/controllers/registrations_controller.rb +6 -4
  93. data/lib/generators/templates/controllers/sessions_controller.rb +4 -2
  94. data/lib/generators/templates/controllers/unlocks_controller.rb +2 -0
  95. data/lib/generators/templates/devise.rb +50 -20
  96. data/lib/generators/templates/markerb/email_changed.markerb +7 -0
  97. data/lib/generators/templates/markerb/password_change.markerb +2 -2
  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 +11 -3
  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 +13 -310
  106. data/.gitignore +0 -10
  107. data/.travis.yml +0 -44
  108. data/.yardopts +0 -9
  109. data/CODE_OF_CONDUCT.md +0 -22
  110. data/CONTRIBUTING.md +0 -16
  111. data/Gemfile +0 -29
  112. data/Gemfile.lock +0 -183
  113. data/Rakefile +0 -36
  114. data/devise.gemspec +0 -27
  115. data/devise.png +0 -0
  116. data/gemfiles/Gemfile.rails-3.2-stable +0 -29
  117. data/gemfiles/Gemfile.rails-3.2-stable.lock +0 -172
  118. data/gemfiles/Gemfile.rails-4.0-stable +0 -29
  119. data/gemfiles/Gemfile.rails-4.0-stable.lock +0 -166
  120. data/gemfiles/Gemfile.rails-4.1-stable +0 -29
  121. data/gemfiles/Gemfile.rails-4.1-stable.lock +0 -172
  122. data/gemfiles/Gemfile.rails-4.2-stable +0 -29
  123. data/gemfiles/Gemfile.rails-4.2-stable.lock +0 -194
  124. data/script/cached-bundle +0 -49
  125. data/script/s3-put +0 -71
  126. data/test/controllers/custom_registrations_controller_test.rb +0 -40
  127. data/test/controllers/custom_strategy_test.rb +0 -62
  128. data/test/controllers/helper_methods_test.rb +0 -21
  129. data/test/controllers/helpers_test.rb +0 -316
  130. data/test/controllers/inherited_controller_i18n_messages_test.rb +0 -51
  131. data/test/controllers/internal_helpers_test.rb +0 -129
  132. data/test/controllers/load_hooks_controller_test.rb +0 -19
  133. data/test/controllers/passwords_controller_test.rb +0 -31
  134. data/test/controllers/sessions_controller_test.rb +0 -103
  135. data/test/controllers/url_helpers_test.rb +0 -65
  136. data/test/delegator_test.rb +0 -19
  137. data/test/devise_test.rb +0 -107
  138. data/test/failure_app_test.rb +0 -315
  139. data/test/generators/active_record_generator_test.rb +0 -109
  140. data/test/generators/controllers_generator_test.rb +0 -48
  141. data/test/generators/devise_generator_test.rb +0 -39
  142. data/test/generators/install_generator_test.rb +0 -13
  143. data/test/generators/mongoid_generator_test.rb +0 -23
  144. data/test/generators/views_generator_test.rb +0 -103
  145. data/test/helpers/devise_helper_test.rb +0 -49
  146. data/test/integration/authenticatable_test.rb +0 -729
  147. data/test/integration/confirmable_test.rb +0 -324
  148. data/test/integration/database_authenticatable_test.rb +0 -95
  149. data/test/integration/http_authenticatable_test.rb +0 -105
  150. data/test/integration/lockable_test.rb +0 -239
  151. data/test/integration/omniauthable_test.rb +0 -135
  152. data/test/integration/recoverable_test.rb +0 -347
  153. data/test/integration/registerable_test.rb +0 -359
  154. data/test/integration/rememberable_test.rb +0 -176
  155. data/test/integration/timeoutable_test.rb +0 -184
  156. data/test/integration/trackable_test.rb +0 -92
  157. data/test/mailers/confirmation_instructions_test.rb +0 -115
  158. data/test/mailers/reset_password_instructions_test.rb +0 -96
  159. data/test/mailers/unlock_instructions_test.rb +0 -91
  160. data/test/mapping_test.rb +0 -134
  161. data/test/models/authenticatable_test.rb +0 -23
  162. data/test/models/confirmable_test.rb +0 -489
  163. data/test/models/database_authenticatable_test.rb +0 -269
  164. data/test/models/lockable_test.rb +0 -328
  165. data/test/models/omniauthable_test.rb +0 -7
  166. data/test/models/recoverable_test.rb +0 -251
  167. data/test/models/registerable_test.rb +0 -7
  168. data/test/models/rememberable_test.rb +0 -204
  169. data/test/models/serializable_test.rb +0 -49
  170. data/test/models/timeoutable_test.rb +0 -51
  171. data/test/models/trackable_test.rb +0 -41
  172. data/test/models/validatable_test.rb +0 -127
  173. data/test/models_test.rb +0 -153
  174. data/test/omniauth/config_test.rb +0 -57
  175. data/test/omniauth/url_helpers_test.rb +0 -54
  176. data/test/orm/active_record.rb +0 -10
  177. data/test/orm/mongoid.rb +0 -13
  178. data/test/parameter_sanitizer_test.rb +0 -81
  179. data/test/rails_app/Rakefile +0 -6
  180. data/test/rails_app/app/active_record/admin.rb +0 -6
  181. data/test/rails_app/app/active_record/shim.rb +0 -2
  182. data/test/rails_app/app/active_record/user.rb +0 -6
  183. data/test/rails_app/app/active_record/user_on_engine.rb +0 -7
  184. data/test/rails_app/app/active_record/user_on_main_app.rb +0 -7
  185. data/test/rails_app/app/active_record/user_without_email.rb +0 -8
  186. data/test/rails_app/app/controllers/admins/sessions_controller.rb +0 -6
  187. data/test/rails_app/app/controllers/admins_controller.rb +0 -6
  188. data/test/rails_app/app/controllers/application_controller.rb +0 -12
  189. data/test/rails_app/app/controllers/application_with_fake_engine.rb +0 -30
  190. data/test/rails_app/app/controllers/custom/registrations_controller.rb +0 -31
  191. data/test/rails_app/app/controllers/home_controller.rb +0 -25
  192. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +0 -2
  193. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +0 -2
  194. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +0 -14
  195. data/test/rails_app/app/controllers/users_controller.rb +0 -31
  196. data/test/rails_app/app/helpers/application_helper.rb +0 -3
  197. data/test/rails_app/app/mailers/users/from_proc_mailer.rb +0 -3
  198. data/test/rails_app/app/mailers/users/mailer.rb +0 -3
  199. data/test/rails_app/app/mailers/users/reply_to_mailer.rb +0 -4
  200. data/test/rails_app/app/mongoid/admin.rb +0 -29
  201. data/test/rails_app/app/mongoid/shim.rb +0 -23
  202. data/test/rails_app/app/mongoid/user.rb +0 -39
  203. data/test/rails_app/app/mongoid/user_on_engine.rb +0 -39
  204. data/test/rails_app/app/mongoid/user_on_main_app.rb +0 -39
  205. data/test/rails_app/app/mongoid/user_without_email.rb +0 -33
  206. data/test/rails_app/app/views/admins/index.html.erb +0 -1
  207. data/test/rails_app/app/views/admins/sessions/new.html.erb +0 -2
  208. data/test/rails_app/app/views/home/admin_dashboard.html.erb +0 -1
  209. data/test/rails_app/app/views/home/index.html.erb +0 -1
  210. data/test/rails_app/app/views/home/join.html.erb +0 -1
  211. data/test/rails_app/app/views/home/private.html.erb +0 -1
  212. data/test/rails_app/app/views/home/user_dashboard.html.erb +0 -1
  213. data/test/rails_app/app/views/layouts/application.html.erb +0 -24
  214. data/test/rails_app/app/views/users/edit_form.html.erb +0 -1
  215. data/test/rails_app/app/views/users/index.html.erb +0 -1
  216. data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +0 -1
  217. data/test/rails_app/app/views/users/sessions/new.html.erb +0 -1
  218. data/test/rails_app/bin/bundle +0 -3
  219. data/test/rails_app/bin/rails +0 -4
  220. data/test/rails_app/bin/rake +0 -4
  221. data/test/rails_app/config/application.rb +0 -40
  222. data/test/rails_app/config/boot.rb +0 -14
  223. data/test/rails_app/config/database.yml +0 -18
  224. data/test/rails_app/config/environment.rb +0 -5
  225. data/test/rails_app/config/environments/development.rb +0 -30
  226. data/test/rails_app/config/environments/production.rb +0 -84
  227. data/test/rails_app/config/environments/test.rb +0 -41
  228. data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  229. data/test/rails_app/config/initializers/devise.rb +0 -180
  230. data/test/rails_app/config/initializers/inflections.rb +0 -2
  231. data/test/rails_app/config/initializers/secret_token.rb +0 -8
  232. data/test/rails_app/config/initializers/session_store.rb +0 -1
  233. data/test/rails_app/config/routes.rb +0 -125
  234. data/test/rails_app/config.ru +0 -4
  235. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -71
  236. data/test/rails_app/db/schema.rb +0 -55
  237. data/test/rails_app/lib/shared_admin.rb +0 -17
  238. data/test/rails_app/lib/shared_user.rb +0 -29
  239. data/test/rails_app/lib/shared_user_without_email.rb +0 -26
  240. data/test/rails_app/lib/shared_user_without_omniauth.rb +0 -13
  241. data/test/rails_app/public/404.html +0 -26
  242. data/test/rails_app/public/422.html +0 -26
  243. data/test/rails_app/public/500.html +0 -26
  244. data/test/rails_app/public/favicon.ico +0 -0
  245. data/test/rails_test.rb +0 -9
  246. data/test/routes_test.rb +0 -264
  247. data/test/support/action_controller/record_identifier.rb +0 -10
  248. data/test/support/assertions.rb +0 -39
  249. data/test/support/helpers.rb +0 -77
  250. data/test/support/integration.rb +0 -92
  251. data/test/support/locale/en.yml +0 -8
  252. data/test/support/mongoid.yml +0 -6
  253. data/test/support/webrat/integrations/rails.rb +0 -24
  254. data/test/test_helper.rb +0 -34
  255. data/test/test_helpers_test.rb +0 -178
  256. data/test/test_models.rb +0 -33
data/CHANGELOG.md CHANGED
@@ -1,1162 +1,319 @@
1
1
  ### Unreleased
2
2
 
3
- ### 3.5.3 - 2015-12-10
3
+ ### 4.7.1 - 2019-09-06
4
4
 
5
5
  * bug fixes
6
- * Fix password reset for records where `confirmation_required?` is disabled and
7
- `confirmation_sent_at` is nil. (by @andygeers)
8
- * Allow resources with no `email` field to be recoverable (and do not clear the
9
- reset password token if the model was already persisted). (by @seddy, @stanhu)
6
+ * Fix an edge case where records with a blank `confirmation_token` could be confirmed (by @tegon)
7
+ * Fix typo inside `update_needs_confirmation` i18n key (by @lslm)
10
8
 
11
- * enhancements
12
- * Upon setting `Devise.send_password_change_notification = true` a user will receive notification when their password has been changed.
13
-
14
- ### 3.5.2 - 2015-08-10
9
+ ### 4.7.0 - 2019-08-19
15
10
 
16
11
  * enhancements
17
- * Perform case insensitive basic authorization matching
12
+ * Support Rails 6.0
13
+ * Update CI to rails 6.0.0.beta3 (by @tunnes)
14
+ * refactor method name to be more consistent (by @saiqulhaq)
15
+ * Fix rails 6.0.rc1 email uniqueness validation deprecation warning (by @Vasfed)
18
16
 
19
17
  * bug fixes
20
- * Do not use digests for password confirmation token
21
- * Fix infinite redirect in Rails 4.2 authenticated routes
22
- * Autoload Devise::Encryptor to avoid errors on thread-safe mode
23
-
24
- * deprecations
25
- * `config.expire_auth_token_on_timeout` was removed
26
-
27
- ### 3.5.1 - 2015-05-24
28
-
29
- Note: 3.5.0 has been yanked due to a regression
18
+ * Add `autocomplete="new-password"` to `password_confirmation` fields (by @ferrl)
19
+ * Fix rails_51_and_up? method for Rails 6.rc1 (by @igorkasyanchuk)
30
20
 
31
- * security improvements
32
- * Clean up reset password token whenever e-mail or password changes. thanks to George Deglin & Dennis Charles Hackethal for reporting this bug
33
- * Ensure empty `authenticable_salt` cannot be used as remember token. This bug can only affect users who manually implement their own `authenticable_salt` and allow empty values as salt
34
-
35
- * enhancements
36
- * The hint about minimum password length required both `@validatable` and `@minimum_password_length` variables on the views, it now uses only the latter. If you have generated the views relying on the `@validatable` variable, replace it with `@minimum_password_length`.
37
- * Added an ActiveSupport load hook for `:devise_controller`. (by @nakhli)
38
- * Location fragments are now preserved between requests. (by @jbourassa)
39
- * Added an `after_remembered` callback for the Rememerable module. (by @BM5k)
40
- * `RegistrationsController#new` and `SessionsController#new` now yields the
41
- current resource. (by @mtarnovan, @deivid-rodriguez)
42
- * Password length validation is now limited to 72 characters for newer apps. (by @lleger)
43
- * Controllers inheriting from any Devise core controller will now use appropriate translations. The i18n scope can be overridden in `translation_scope`.
44
- * Allow the user to set the length of friendly token. (by @Angelmmiguel)
21
+ ### 4.6.2 - 2019-03-26
45
22
 
46
23
  * bug fixes
47
- * Use router_name from scope if one is available to support isolated engines. (by @cipater)
48
- * Do not clean up CSRF on rememberable.
49
- * Only use flash if it has been configured in failure app. (by @alex88)
50
-
51
- * deprecations
52
- * `confirm!` has been deprecated in favor of `confirm`.
53
- * `reset_password!` has been deprecated in favor of `reset_password`.
54
- * `Devise.bcrypt` has been deprecated in favor of `Devise::Encryptor.digest`".
55
-
56
- ### 3.4.1 - 2014-10-29
57
-
58
- * enhancements
59
- * Devise default views now have a similar markup to Rails scaffold views. (by @udaysinghcode, @cllns)
60
- * Passing `now: true` to the `set_flash_message` helper now sets the message into
61
- the `flash.now` Hash. (by @hbriggs)
62
- * bugfixes
63
- * Fixed an regression with translation of flash messages for when the `authentication_keys`
64
- config is a Hash. (by @lucasmazza)
65
-
66
- ### 3.4.0 - 2014-10-03
67
-
68
- * enhancements
69
- * Support added for Rails 4.2. Devise now depends on the `responders` gem due
70
- the extraction of the `respond_with` API from Rails. (by @lucasmazza)
71
- * The Simple Form templates follow the same change from 3.3.0 by using `Log in` and adding
72
- a hint about the minimum password length when `validatable` is enabled. (by @aried3r)
73
- * Controller generator added as `devise:controllers SCOPE`. You can use the `-c` flag
74
- to pick which controllers (`unlocks`, `confirmations`, etc) you want to generate. (by @Chun-Yang)
75
- * Removed the hardcoded references for "email" in the flash messages. If you are using
76
- different attributes as the `authentication_keys` they will be interpolated in the
77
- messages instead. (by @timoschilling)
78
- * bug fix
79
- * Fixed a regression where the devise generator would fail with a `ConnectionNotEstablished`
80
- exception when executed inside a mountable engine. (by @lucasmazza)
81
- * Ensure to return symbols in find_scope! fixing a previous regression from 3.3.0 (by @micat)
82
- * Ensure all causes of failed login have the same error message (by @pjungwir)
83
- * The `last_attempt_warning` now takes effect when generating the unauthenticated
84
- message for your users. To keep the current behavior, this flag is now `true`
85
- by default. (by @lucasmazza)
86
-
87
- ### 3.3.0 - 2014-08-13
88
-
89
- * enhancements
90
- * Support multiple warden configuration blocks on devise configuration. (by @rossta)
91
- * Previously, when a user signed out, all remember me tokens for all sessions/browsers would be
92
- invalidated, and this behavior could not be changed. This behavior is now configurable via
93
- `expire_all_remember_me_on_sign_out`. The default continues to be true. (by @laurocaetano)
94
- * Default email messages was updated with grammar fixes, check the diff on
95
- #2906 for the updated copy (by @p-originate)
96
- * Allow a resource to be found based on its encrypted password token (by @karlentwistle)
97
- * Adds `devise_group`, a macro to define controller helpers for multiple mappings at once. (by @dropletzz)
98
- * The default views now use `Log in` instead of `Sign in` and have a hint about the minimum password length if
99
- the current scope is using the `validatable` module (by @alexsoble)
100
-
101
- * bug fix
102
- * Check if there is a signed in user before executing the `SessionsController#destroy`.
103
- * `SessionsController#destroy` no longer yields the `resource` to receiving block,
104
- since the resource isn't loaded in the action. If you need access to the current
105
- resource when overring the action use the scope helper (like `current_user`) before
106
- calling `super`
107
- * Serialize the `last_request_at` entry as an Integer
108
- * Ensure registration controller block yields happen on failure in addition to success (by @dpehrson)
109
- * Only valid paths will be stored for redirections (by @parallel588)
110
-
111
- ### 3.2.4 - 2014-03-17
112
-
113
- * enhancements
114
- * `bcrypt` dependency updated due https://github.com/codahale/bcrypt-ruby/pull/86.
115
- * View generator now can generate specific views with the `-v` flag, like `rails g devise:views -v sessions` (by @kayline)
116
-
117
- ### 3.2.3 - 2014-02-20
118
-
119
- * enhancements
120
- * Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`.
121
- You can change this and use your own secret by changing the `devise.rb` initializer.
122
-
123
- * bug fix
124
- * Migrations will be properly generated when using rails 4.1.0.
125
-
126
- ### 3.2.2 - 2013-11-25
127
-
128
- * bug fix
129
- * Ensure timeoutable works when `sign_out_all_scopes` is false (by @louman)
130
- * Keep the query string when storing location (by @csexton)
131
- * Require rails generator base class in devise generators
132
-
133
- ### 3.2.1 - 2013-11-13
134
-
135
- Security announcement: http://blog.plataformatec.com.br/2013/11/e-mail-enumeration-in-devise-in-paranoid-mode
136
-
137
- * enhancements
138
- * Add `store_location_for` helper and ensure it is safe (by @matthewrudy and @homakov)
139
- * Add `yield` around resource methods in Devise controllers (by @edelpero)
140
-
141
- * bug fix
142
- * Bring `password_digest` back to fix compatibility with `devise-encryptable`
143
- * Avoid e-mail enumeration on sign in when in paranoid mode
144
-
145
- ### 3.2.0 - 2013-11-06
146
-
147
- * enhancements
148
- * Previously deprecated token authenticatable and insecure lookups have been removed
149
- * Add a class method so you can encrypt passwords from fixtures (by @tenderlove)
150
- * Send custom message when user enters invalid password and it has only one attempt
151
- to enter correct password before their account will be locked (by @Lightpower)
152
- * Prevent mutation of values assigned to case and whitespace santitized members (by @iamvery)
153
- * Separate redirects and flash messages in `navigational_formats` and `flashing_formats` (by @ssendev)
154
-
155
- * bug fix
156
- * A GET to sign_in page shouldn't extend the session (by @drewish)
157
- * Splat the arguments to `strong_parameters#permit` to work around a limitation in the `strong_parameters` gem (by @memberful)
158
- * Omniauth now uses `mapping.fullpath` when generating routes. This means if you call `devise_for :users` inside a scope, like `scope "/api"`, the scope will now apply to the omniauth route (by @AlexanderZaytsev)
159
- * Ensure timeoutable hook respects `Devise.sign_out_all_scopes` configuration
160
-
161
- * deprecations
162
- * `expire_session_data_after_sign_in!` has been deprecated in favor of `expire_data_after_sign_in!`
163
-
164
- ### 3.1.1 - 2013-10-01
165
-
166
- * bug fix
167
- * Improve default message which asked users to sign in even when they were already signed (by @gregates)
168
- * Improve error message for when the config.secret_key is missing
169
-
170
- ### 3.1.0 - 2013-09-05
171
-
172
- Security announcement: http://blog.plataformatec.com.br/2013/08/devise-3-1-now-with-more-secure-defaults/
173
-
174
- * backwards incompatible changes
175
- * Do not store confirmation, unlock and reset password tokens directly in the database. This means tokens previously stored in the database are no longer valid. You can reenable this temporarily by setting `config.allow_insecure_token_lookup = true` in your configuration file. It is recommended to keep this configuration set to true just temporarily in your production servers only to aid migration
176
- * The Devise mailer and its views were changed to explicitly receive a token argument as `@token`. You will need to update your mailers and re-copy the views to your application with `rails g devise:views`
177
- * Sanitization of parameters should be done by calling `devise_parameter_sanitizer.sanitize(:action)` instead of `devise_parameter_sanitizer.for(:action)`
178
-
179
- * deprecations
180
- * Token authentication is deprecated
181
-
182
- * enhancements
183
- * Better security defaults
184
- * Allow easier customization of parameter sanitizer (by @alexpeattie)
185
-
186
- * bug fix
187
- * Do not confirm e-mail after password reset (by @moll)
188
- * Do not sign in after confirmation
189
- * Do not store confirmation, unlock and reset password tokens directly in the database
190
- * Do not compare directly against confirmation, unlock and reset password tokens
191
- * Skip storage for cookies on unverified requests
192
-
193
- ### 3.0.2 - 2013-08-09
194
-
195
- * bug fix
196
- * Skip storage for cookies on unverified requests
197
-
198
- ### 3.0.1 - 2013-08-02
199
-
200
- Security announcement: http://blog.plataformatec.com.br/2013/08/csrf-token-fixation-attacks-in-devise/
201
-
202
- * enhancements
203
- * Add after_confirmation callback
204
-
205
- * bug fix
206
- * When using rails 3.2, the generator adds 'attr_accessible' to the model (by @jcoyne)
207
- * Clean up CSRF token after authentication (by @homakov). Notice this change will clean up the CSRF Token after authentication (sign in, sign up, etc). So if you are using AJAX for such features, you will need to fetch a new CSRF token from the server.
208
-
209
- ### 3.0.0 - 2013-07-14
210
-
211
- * enhancements
212
- * Rails 4 and Strong Parameters compatibility (by @carlosantoniodasilva, @josevalim, @latortuga, @lucasmazza, @nashby, @rafaelfranca, @spastorino)
213
- * Drop support for Rails < 3.2 and Ruby < 1.9.3
214
- * Enable to skip sending reconfirmation email when reconfirmable is on and `skip_confirmation_notification!` is invoked (by @tkhr)
215
-
216
- * bug fix
217
- * Errors on unlock are now properly reflected on the first `unlock_keys`
218
-
219
- ### 2.2.4 - 2013-05-07
220
-
221
- * enhancements
222
- * Add `destroy_with_password` to `DatabaseAuthenticatable`. Allows destroying a record when `:current_password` matches, similarly to how `update_with_password` works. (by @michiel3)
223
- * Allow to override path after password resetting (by @worker8)
224
- * Add `#skip_confirmation_notification!` method to `Confirmable`. Allows skipping confirmation email without auto-confirming. (by @gregates)
225
- * allow_unconfirmed_access_for config from `:confirmable` module can be set to `nil` that means unconfirmed access for unlimited time. (by @nashby)
226
- * Support Rails' token strategy on authentication (by @robhurring)
227
- * Support explicitly setting the http authentication key via `config.http_authentication_key` (by @neo)
228
-
229
- * bug fix
230
- * Do not redirect when accessing devise API via JSON. (by @sebastianwr)
231
- * Generating scoped devise views now uses the correct scoped shared links partial instead of the default devise one (by @nashby)
232
- * Fix inheriting mailer templates from `Devise::Mailer`
233
- * Fix a bug when procs are used as default mailer in Devise (by @tomasv)
234
-
235
- * backwards incompatible changes
236
- * Changes on session storage will expire all existing sessions on upgrade. For those storing the session in the DB, they can be upgraded according to this gist: https://gist.github.com/moll/6417606
237
-
238
- ### 2.2.3 - 2013-01-26
239
-
240
- Security announcement: http://blog.plataformatec.com.br/2013/01/security-announcement-devise-v2-2-3-v2-1-3-v2-0-5-and-v1-5-3-released/
241
-
242
- * bug fix
243
- * Require string conversion for all values
244
-
245
- ### 2.2.2 - 2013-01-15
246
-
247
- * bug fix
248
- * Fix bug when checking for reconfirmable in templates
249
-
250
- ### 2.2.1 - 2013-01-11
251
-
252
- * bug fix
253
- * Fix regression with case_insensitive_keys
254
- * Fix regression when password is blank when it is invalid
255
-
256
- ### 2.2.0 - 2013-01-08
257
-
258
- * backwards incompatible changes
259
- * `headers_for` is deprecated, customize the mailer directly instead
260
- * All mailer methods now expect a second argument with delivery options
261
- * Default minimum password length is now 8 (by @carlosgaldino)
262
- * Support alternate sign in error message when email record does not exist (this adds a new I18n key to the locale file) (by @gabetax)
263
- * DeviseController responds only to HTML requests by default (call `DeviseController.respond_to` or `ApplicationController.respond_to` to add new formats)
264
- * Support Mongoid 3 onwards (by @durran)
265
-
266
- * enhancements
267
- * Fix unlockable which could leak account existence on paranoid mode (by @latortuga)
268
- * Confirmable now has a confirm_within option to set a period while the confirmation token is still valid (by @promisedlandt)
269
- * Flash messages in controller now respects `resource_name` (by @latortuga)
270
- * Separate `sign_in` and `sign_up` on RegistrationsController (by @rubynortheast)
271
- * Add autofocus to default views (by @Radagaisus)
272
- * Unlock user on password reset (by @marcinb)
273
- * Allow validation callbacks to apply to virtual attributes (by @latortuga)
274
-
275
- * bug fix
276
- * unconfirmed_email now uses the proper e-mail on salutation
277
- * Fix default email_regexp config to not allow spaces (by @kukula)
278
- * Fix a regression introduced on warden 1.2.1 (by @ejfinneran)
279
- * Properly camelize omniauth strategies (by @saizai)
280
- * Do not set flash messages for non navigational requests on session sign out (by @mathieul)
281
- * Set the proper fields as required on the lockable module (by @nickhoffman)
282
- * Respects Devise mailer default's reply_to (by @mrchrisadams)
283
- * Properly assign resource on `sign_in` related action (by @adammcnamara)
284
- * `update_with_password` doesn't change encrypted password when it is invalid (by @nashby)
285
- * Properly handle namespaced models on Active Record generator (by @nashby)
286
-
287
- ### 2.1.4 - 2013-08-18
288
-
289
- * bugfix
290
- * Do not confirm account after reset password
291
-
292
- ### 2.1.3 - 2013-01-26
293
-
294
- * bugfix
295
- * Require string conversion for all values
296
-
297
- ### 2.1.2 - 2012-06-19
298
-
299
- * enhancements
300
- * Handle backwards incompatibility between Rails 3.2.6 and Thor 0.15.x
301
-
302
- * bug fix
303
- * Fix regression on strategy validation on previous release
304
-
305
- ### 2.1.1 - 2012-06-15 (yanked)
306
-
307
- * enhancements
308
- * `sign_out_all_scopes` now locks warden and does not allow new logins in the same action
309
- * `Devise.omniauth_path_prefix` is available to configure omniauth path prefix
310
- * Redirect to sign in page when trying to access password#edit without a token (by @gbataille)
311
- * Allow a lambda in authenticate(d) routes helpers to further select the scope
312
- * Removed warnings on Rails 3.2.6 (by @nashby)
313
-
314
- * bug fix
315
- * `update_with_password` now relies on assign_attributes and forwards the :as option (by @wtn)
316
- * Do not trigger timeout on sign in related actions
317
- * Timeout does not explode when reset_authentication_token! is accidentally defined by Active Model (by @remomueller)
318
-
319
- * deprecations
320
- * Strategy#validate() no longer validates nil resources
321
-
322
- ### 2.1.0 - 2012-05-15
323
-
324
- * enhancements
325
- * Add `check_fields!(model_class)` method on Devise::Models to check if the model includes the fields that Devise uses
326
- * Add `skip_reconfirmation!` to skip reconfirmation
327
- * Devise model generator now works with engines
328
- * Devise encryptable was moved to its new gem (http://github.com/plataformatec/devise-encryptable)
329
-
330
- * deprecations
331
- * Deprecations warnings added on Devise 2.0 are now removed with their features
332
- * All devise modules should now have a `required_fields(klass)` module method to help gathering missing attributes
333
- * `use_salt_as_remember_token` and `apply_schema` does not have any effect since 2.0 and are now deprecated
334
- * `valid_for_authentication?` must now return a boolean
335
-
336
- * bug fix
337
- * Ensure after sign in hook is not called without a resource
338
- * Fix a term: now on Omniauth related flash messages, we say that we're authenticating from an omniauth provider instead of authorizing
339
- * Fixed redirect when authenticated mounted apps (by @hakanensari)
340
- * Ensure the failure app still respects config.relative_url_root
341
- * `/users/sign_in` doesn't choke on protected attributes used to select sign in scope (by @Paymium)
342
- * `failed_attempts` is set to zero after any sign in (including via reset password) (by @rodrigoflores)
343
- * Added token expiration on timeout (by @antiarchitect)
344
- * Do not accidentally mark `_prefixes` as private
345
- * Better support for custom strategies on test helpers (by @mattconnolly)
346
- * Return `head :no_content` in SessionsController now that most JS libraries handle it (by @julianvargasalvarez)
347
- * Reverted moving devise/shared/_links.erb to devise/_links.erb
348
-
349
- ### 2.0.4 - 2012-02-17
350
-
351
- Notes: https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0
352
-
353
- * bug fix
354
- * Fix when :host is used with devise_for (by @mreinsch)
355
- * Fix a regression that caused Warden to be initialized too late
356
-
357
- ### 2.0.3 - 2012-06-16 (yanked)
358
-
359
- * bug fix
360
- * Ensure warning is not shown by mistake on apps with mounted engines
361
- * Fixes related to remember_token and rememberable_options
362
- * Ensure serializable_hash does not depend on accessible attributes
363
- * Ensure that timeout callback does not run on sign out action
364
-
365
- ### 2.0.2 - 2012-02-14
366
-
367
- * enhancements
368
- * Add devise_i18n_options to customize I18n message
369
-
370
- * bug fix
371
- * Ensure Devise.available_router_name defaults to :main_app
372
- * Set autocomplete to off for password on edit forms
373
- * Better error messages in case a trackable model can't be saved
374
- * Show a warning in case someone gives a pluralized name to devise generator
375
- * Fix test behavior for rspec subject requests (by @sj26)
376
-
377
- ### 2.0.1 - 2012-02-09
378
-
379
- * enhancements
380
- * Improved error messages on deprecation warnings
381
- * Hide Devise's internal generators from `rails g` command
382
-
383
- * bug fix
384
- * Removed tmp and log files from gem
385
-
386
- ### 2.0.0 - 2012-01-26
387
-
388
- * enhancements
389
- * Add support for e-mail reconfirmation on change (by @Mandaryn and @heimidal)
390
- * Redirect users to sign in page after unlock (by @nashby)
391
- * Redirect to the previous URL on timeout
392
- * Inherit from the same Devise parent controller (by @sj26)
393
- * Allow parent_controller to be customizable via Devise.parent_controller, useful for engines
394
- * Allow router_name to be customizable via Devise.router_name, useful for engines
395
- * Allow alternate ORMs to run compatibility setup code before Authenticatable is included (by @jm81)
396
-
397
- * deprecation
398
- * Devise now only supports Rails 3.1 forward
399
- * Devise.confirm_within was deprecated in favor Devise.allow_unconfirmed_access_for
400
- * Devise.stateless_token= is deprecated in favor of appending :token_auth to Devise.skip_session_storage
401
- * Usage of Devise.apply_schema is deprecated
402
- * Usage of Devise migration helpers are deprecated
403
- * Usage of Devise.remember_across_browsers was deprecated
404
- * Usage of rememberable with remember_token was removed
405
- * Usage of recoverable without reset_password_sent_at was removed
406
- * Usage of Devise.case_insensitive_keys equals to false was removed
407
- * Move devise/shared/_links.erb to devise/_links.erb
408
- * Deprecated support of nested devise_for blocks
409
- * Deprecated support to devise.registrations.reasons and devise.registrations.inactive_signed_up in favor of devise.registrations.signed_up_but_*
410
- * Protected method render_with_scope was removed.
411
-
412
- ### 1.5.3 - 2011-12-19
413
-
414
- * bug fix
415
- * Ensure delegator converts scope to symbol (by @dmitriy-kiriyenko)
416
- * Ensure passing :format => false to devise_for is not permanent
417
- * Ensure path checker does not check invalid routes
418
-
419
- ### 1.5.2 - 2011-11-30
420
-
421
- * enhancements
422
- * Add support for Rails 3.1 new mass assignment conventions (by @kirs)
423
- * Add timeout_in method to Timeoutable, it can be overridden in a model (by @lest)
424
-
425
- * bug fix
426
- * OmniAuth error message now shows the proper option (:strategy_class instead of :klass)
427
-
428
- ### 1.5.1 - 2011-11-22
429
-
430
- * bug fix
431
- * Devise should not attempt to load OmniAuth strategies. Strategies should be loaded before hand by the developer or explicitly given to Devise.
432
-
433
- ### 1.5.0 - 2011-11-13
434
-
435
- * enhancements
436
- * Timeoutable also skips tracking if skip_trackable is given
437
- * devise_for now accepts :failure_app as an option
438
- * Models can select the proper mailer via devise_mailer method (by @locomotivecms)
439
- * Migration generator now uses the change method (by @nashby)
440
- * Support to markerb templates on the mailer generator (by @sbounmy)
441
- * Support for Omniauth 1.0 (older versions are no longer supported) (by @TamiasSibiricus)
442
-
443
- * bug fix
444
- * Allow idempotent API requests
445
- * Fix bug where logs did not show 401 as status code
446
- * Change paranoid settings to behave as success instead of as failure
447
- * Fix bug where activation messages were shown first than the credentials error message
448
- * Instance variables are expired after sign out
449
-
450
- * deprecation
451
- * redirect_location is deprecated, please use after_sign_in_path_for
452
- * after_sign_in_path_for now redirects to session[scope_return_to] if any value is stored in it
453
-
454
- ### 1.4.9 - 2011-10-19
455
-
456
- * bug fix
457
- * url helpers were not being set under some circumstances
458
-
459
- ### 1.4.8 - 2011-10-09
460
-
461
- * enhancements
462
- * Add docs for assets pipeline and Heroku
463
-
464
- * bug fix
465
- * confirmation_url was not being set under some circumstances
466
-
467
- ### 1.4.7 - 2011-09-21
468
-
469
- * bug fix
470
- * Fix backward incompatible change from 1.4.6 for those using custom controllers
471
-
472
- ### 1.4.6 - 2011-09-19 (yanked)
473
-
474
- * enhancements
475
- * Allow devise_for :skip => :all
476
- * Allow options to be passed to authenticate_user!
477
- * Allow --skip-routes to devise generator
478
- * Add allow_params_authentication! to make it explicit when params authentication is allowed in a controller
479
-
480
- ### 1.4.5 - 2011-09-07
481
-
482
- * bug fix
483
- * Failure app tries the root path if a session one does not exist
484
- * No need to finalize Devise helpers all the time (by @bradleypriest)
485
- * Reset password shows proper message if user is not active
486
- * `clean_up_passwords` sets the accessors to nil to skip validations
487
-
488
- ### 1.4.4 - 2011-08-30
489
-
490
- * bug fix
491
- * Do not always skip helpers, instead provide :skip_helpers as option to trigger it manually
492
-
493
- ### 1.4.3 - 2011-08-29
494
-
495
- * enhancements
496
- * Improve Rails 3.1 compatibility
497
- * Use serialize_into_session and serialize_from_session in Warden serialize to improve extensibility
498
-
499
- * bug fix
500
- * Generator properly generates a change_table migration if a model already exists
501
- * Properly deprecate setup_mail
502
- * Fix encoding issues with email regexp
503
- * Only generate helpers for the used mappings
504
- * Wrap :action constraints in the proper hash
505
-
506
- * deprecations
507
- * Loosened the used email regexp to simply assert the existent of "@". If someone relies on a more strict regexp, they may use https://github.com/SixArm/sixarm_ruby_email_address_validation
508
-
509
- ### 1.4.2 - 2011-06-30
510
-
511
- * bug fix
512
- * Provide a more robust behavior to serializers and add :force_except option
513
-
514
- ### 1.4.1 - 2011-06-29
515
-
516
- * enhancements
517
- * Add :defaults and :format support on router
518
- * Add simple form generators
519
- * Better localization for devise_error_messages! (by @zedtux)
520
-
521
- * bug fix
522
- * Ensure to_xml is properly white listened
523
- * Ensure handle_unverified_request clean up any cached signed-in user
524
-
525
- ### 1.4.0 - 2011-06-23
526
-
527
- * enhancements
528
- * Added authenticated and unauthenticated to the router to route the used based on their status (by @sj26)
529
- * Improve e-mail regexp (by @rodrigoflores)
530
- * Add strip_whitespace_keys and default to e-mail (by @swrobel)
531
- * Do not run format and uniqueness validations on e-mail if it hasn't changed (by @Thibaut)
532
- * Added update_without_password to update models but not allowing the password to change (by @fschwahn)
533
- * Added config.paranoid, check the generator for more information (by @rodrigoflores)
534
-
535
- * bug fix
536
- * password_required? should not affect length validation
537
- * User cannot access sign up and similar pages if they are already signed in through a cookie or token
538
- * Do not convert booleans to strings on finders (by @xavier)
539
- * Run validations even if current_password fails (by @crx)
540
- * Devise now honors routes constraints (by @macmartine)
541
- * Do not return the user resource when requesting instructions (by @rodrigoflores)
542
-
543
- ### 1.3.4 - 2011-04-28
544
-
545
- * bug fix
546
- * Do not add formats if html or "*/*"
547
-
548
- ### 1.3.3 - 2011-04-20
549
-
550
- * bug fix
551
- * Explicitly mark the token as expired if so
552
-
553
- ### 1.3.2 - 2011-04-20
554
-
555
- * bug fix
556
- * Fix another regression related to reset_password_sent_at (by @alexdreher)
557
-
558
- ### 1.3.1 - 2011-04-18
559
-
560
- * enhancements
561
- * Improve failure_app responses (by @indirect)
562
- * sessions/new and registrations/new also respond to xml and json now
563
-
564
- * bug fix
565
- * Fix a regression that occurred if reset_password_sent_at is not present (by @stevehodgkiss)
566
-
567
- ### 1.3.0 - 2011-04-15
568
-
569
- * enhancements
570
- * All controllers can now handle different mime types than html using Responders (by @sikachu)
571
- * Added reset_password_within as configuration option to send the token for recovery (by @jdguyot)
572
- * Bump password length to 128 characters (by @k33l0r)
573
- * Add :only as option to devise_for (by @timoschilling)
574
- * Allow to override path after sending password instructions (by @irohiroki)
575
- * require_no_authentication has its own flash message (by @jackdempsey)
576
-
577
- * bug fix
578
- * Fix a bug where configuration options were being included too late
579
- * Ensure Devise::TestHelpers can be used to tests Devise internal controllers (by @jwilger)
580
- * valid_password? should not choke on empty passwords (by @mikel)
581
- * Calling devise more than once does not include previously added modules anymore
582
- * downcase_keys before validation
583
-
584
- * backward incompatible changes
585
- * authentication_keys are no longer considered when creating the e-mail validations, the previous behavior was buggy. You must double check if you were relying on such behavior.
586
-
587
- ### 1.2.1 - 2011-03-27
588
-
589
- * enhancements
590
- * Improve update path messages
591
-
592
- ### 1.2.0 - 2011-03-24
593
-
594
- * bug fix
595
- * Properly ignore path prefix on omniauthable
596
- * Faster uniqueness queries
597
- * Rename active? to active_for_authentication? to avoid conflicts
598
-
599
- ### 1.2.rc2 - 2011-03-10
600
-
601
- * enhancements
602
- * Make friendly_token 20 chars long
603
- * Use secure_compare
604
-
605
- * bug fix
606
- * Fix an issue causing infinite redirects in production
607
- * rails g destroy works properly with devise generators (by @andmej)
608
- * before_failure callbacks should work on test helpers (by @twinge)
609
- * rememberable cookie now is httponly by default (by @JamesFerguson)
610
- * Add missing confirmation_keys (by @JohnPlummer)
611
- * Ensure after_* hooks are called on RegistrationsController
612
- * When using database_authenticatable Devise will now only create an email field when appropriate (if using default authentication_keys or custom authentication_keys with email included)
613
- * Ensure stateless token does not trigger timeout (by @pixelauthority)
614
- * Implement handle_unverified_request for Rails 3.0.4 compatibility and improve FailureApp reliance on symbols
615
- * Consider namespaces while generating routes
616
- * Custom failure apps no longer ignored in test mode (by @jaghion)
617
- * Do not depend on ActiveModel::Dirty
618
- * Manual sign_in now triggers remember token
619
- * Be sure to halt strategies on failures
620
- * Consider SCRIPT_NAME on Omniauth paths
621
- * Reset failed attempts when lock is expired
622
- * Ensure there is no Mongoid injection
623
-
624
- * deprecations
625
- * Deprecated anybody_signed_in? in favor of signed_in? (by @gavinhughes)
626
- * Removed --haml and --slim view templates
627
- * Devise::OmniAuth helpers were deprecated and removed in favor of Omniauth.config.test_mode
628
-
629
- ### 1.2.rc - 2010-10-25
630
-
631
- * deprecations
632
- * cookie_domain is deprecated in favor of cookie_options
633
- * after_update_path_for can no longer be defined in ApplicationController
634
-
635
- * enhancements
636
- * Added OmniAuth support
637
- * Added ORM adapter to abstract ORM iteraction
638
- * sign_out_via is available in the router to configure the method used for sign out (by @martinrehfeld)
639
- * Improved Ajax requests handling in failure app (by @spastorino)
640
- * Added request_keys to easily use request specific values (like subdomain) in authentication
641
- * Increased the size of friendly_token to 60 characters (reduces the chances of a successful brute attack)
642
- * Ensure the friendly token does not include "_" or "-" since some e-mails may not autolink it properly (by @rymai)
643
- * Extracted encryptors into :encryptable for better bcrypt support
644
- * :rememberable is now able to use salt as token if no remember_token is provided
645
- * Store the salt in session and expire the session if the user changes their password
646
- * Allow :stateless_token to be set to true avoiding users to be stored in session through token authentication
647
- * cookie_options uses session_options values by default
648
- * Sign up now checks if the user is active or not and redirect them accordingly, setting the inactive_signed_up message
649
- * Use ActiveModel#to_key instead of #id
650
- * sign_out_all_scopes now destroys the whole session
651
- * Added case_insensitive_keys that automatically downcases the given keys, by default downcases only e-mail (by @adahl)
652
-
653
- * default behavior changes
654
- * sign_out_all_scopes defaults to true as security measure
655
- * http authenticatable is disabled by default
656
- * Devise does not intercept 401 returned from applications
657
-
658
- * bugfix
659
- * after_sign_in_path_for always receives a resource
660
- * Do not execute Warden::Callbacks on Devise::TestHelpers (by @sgronblo)
661
- * Allow password recovery and account unlocking to change used keys (by @RStankov)
662
- * FailureApp now properly handles nil request.format
663
- * Fix a bug causing FailureApp to return with HTTP Auth Headers for IE7
664
- * Ensure namespaces has proper scoped views
665
- * Ensure Devise does not set empty flash messages (by @sxross)
666
-
667
- ### 1.1.6 - 2011-02-14
668
-
669
- * Use a more secure e-mail regexp
670
- * Implement Rails 3.0.4 handle unverified request
671
- * Use secure_compare to compare passwords
672
-
673
- ### 1.1.5 - 2010-11-26
674
-
675
- * bugfix
676
- * Ensure to convert keys on indifferent hash
677
-
678
- * defaults
679
- * Set config.http_authenticatable to false to avoid confusion
680
-
681
- ### 1.1.4 - 2010-11-25
682
-
683
- * bugfix
684
- * Avoid session fixation attacks
685
-
686
- ### 1.1.3 - 2010-09-23
687
-
688
- * bugfix
689
- * Add reply-to to e-mail headers by default
690
- * Updated the views generator to respect the rails :template_engine option (by @fredwu)
691
- * Check the type of HTTP Authentication before using Basic headers
692
- * Avoid invalid_salt errors by checking salt presence (by @thibaudgg)
693
- * Forget user deletes the right cookie before logout, not remembering the user anymore (by @emtrane)
694
- * Fix for failed first-ever logins on PostgreSQL where column default is nil (by @bensie)
695
- * :default options is now honored in migrations
696
-
697
- ### 1.1.2 - 2010-08-25
698
-
699
- * bugfix
700
- * Compatibility with latest Rails routes schema
701
-
702
- ### 1.1.1 - 2010-07-26
703
-
704
- * bugfix
705
- * Fix a small bug where generated locale file was empty on devise:install
706
-
707
- ### 1.1.0 - 2010-07-25
708
-
709
- * enhancements
710
- * Rememberable module allows user to be remembered across browsers and is enabled by default (by @trevorturk)
711
- * Rememberable module allows you to activate the period the remember me token is extended (by @trevorturk)
712
- * devise_for can now be used together with scope method in routes but with a few limitations (check the documentation)
713
- * Support `as` or `devise_scope` in the router to specify controller access scope
714
- * HTTP Basic Auth can now be disabled/enabled for xhr(ajax) requests using http_authenticatable_on_xhr option (by @pellja)
715
-
716
- * bug fix
717
- * Fix a bug in Devise::TestHelpers where current_user was returning a Response object for non active accounts
718
- * Devise should respect script_name and path_info contracts
719
- * Fix a bug when accessing a path with (.:format) (by @klacointe)
720
- * Do not add unlock routes unless unlock strategy is email or both
721
- * Email should be case insensitive
722
- * Store classes as string in session, to avoid serialization and stale data issues
723
-
724
- * deprecations
725
- * use_default_scope is deprecated and has no effect. Use :as or :devise_scope in the router instead
726
-
727
- ### 1.1.rc2 - 2010-06-22
728
-
729
- * enhancements
730
- * Allow to set cookie domain for the remember token. (by @mantas)
731
- * Added navigational formats to specify when it should return a 302 and when a 401.
732
- * Added authenticate(scope) support in routes (by @wildchild)
733
- * Added after_update_path_for to registrations controller (by @thedelchop)
734
- * Allow the mailer object to be replaced through config.mailer = "MyOwnMailer"
24
+ * 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/plataformatec/devise/issues/5033#issuecomment-476386275 (by @mracos)
735
25
 
736
- * bug fix
737
- * Fix a bug where session was timing out on sign out
26
+ ### 4.6.1 - 2019-02-11
738
27
 
739
- * deprecations
740
- * bcrypt is now the default encryptor
741
- * devise.mailer.confirmations_instructions now should be devise.mailer.confirmations_instructions.subject
742
- * devise.mailer.user.confirmations_instructions now should be devise.mailer.confirmations_instructions.user_subject
743
- * Generators now use Rails 3 syntax (devise:install) instead of devise_install
744
-
745
- ### 1.1.rc1 - 2010-04-14
746
-
747
- * enhancements
748
- * Rails 3 compatibility
749
- * All controllers and views are namespaced, for example: Devise::SessionsController and "devise/sessions"
750
- * Devise.orm is deprecated. This reduces the required API to hook your ORM with devise
751
- * Use metal for failure app
752
- * HTML e-mails now have proper formatting
753
- * Allow to give :skip and :controllers in routes
754
- * Move trackable logic to the model
755
- * E-mails now use any template available in the filesystem. Easy to create multipart e-mails
756
- * E-mails asks headers_for in the model to set the proper headers
757
- * Allow to specify haml in devise_views
758
- * Compatibility with Mongoid
759
- * Make config.devise available on config/application.rb
760
- * TokenAuthenticatable now works with HTTP Basic Auth
761
- * Allow :unlock_strategy to be :none and add :lock_strategy which can be :failed_attempts or none. Setting those values to :none means that you want to handle lock and unlocking by yourself
762
- * No need to append ?unauthenticated=true in URLs anymore since Flash was moved to a middleware in Rails 3
763
- * :activatable is included by default in your models
764
-
765
- * bug fix
766
- * Fix a bug with STI
767
-
768
- * deprecations
769
- * Rails 3 compatible only
770
- * Removed support for MongoMapper
771
- * Scoped views are no longer "sessions/users/new". Now use "users/sessions/new"
772
- * Devise.orm is deprecated, just require "devise/orm/YOUR_ORM" instead
773
- * Devise.default_url_options is deprecated, just modify ApplicationController.default_url_options
774
- * All messages under devise.sessions, except :signed_in and :signed_out, should be moved to devise.failure
775
- * :as and :scope in routes is deprecated. Use :path and :singular instead
28
+ * bug fixes
29
+ * Check if `root_path` is defined with `#respond_to?` instead of `#present` (by @tegon)
776
30
 
777
- ### 1.0.8 - 2010-06-22
31
+ ### 4.6.0 - 2019-02-07
778
32
 
779
33
  * enhancements
780
- * Support for latest MongoMapper
781
- * Added anybody_signed_in? helper (by @SSDany)
782
-
783
- * bug fix
784
- * confirmation_required? is properly honored on active? calls. (by @paulrosania)
34
+ * Allow to skip email and password change notifications (by @iorme1)
35
+ * Include the use of `nil` for `allow_unconfirmed_access_for` in the docs (by @joaumg)
36
+ * Ignore useless files into the `.gem` file (by @huacnlee)
37
+ * Explain the code that prevents enumeration attacks inside `Devise::Strategies::DatabaseAuthenticatable` (by @tegon)
38
+ * Refactor the `devise_error_messages!` helper to render a partial (by @prograhamer)
39
+ * Add an option (`Devise.sign_in_after_change_password`) to not automatically sign in a user after changing a password (by @knjko)
785
40
 
786
- ### 1.0.7 - 2010-05-02
41
+ * bug fixes
42
+ * Fix missing comma in Simple Form generator (by @colinross)
43
+ * Fix error with migration generator in Rails 6 (by @oystersauce8)
44
+ * Set `encrypted_password` to `nil` when `password` is set to `nil` (by @sivagollapalli)
45
+ * Consider whether the request supports flash messages inside `Devise::Controllers::Helpers#is_flashing_format?` (by @colinross)
46
+ * Fix typo inside `Devise::Generators::ControllersGenerator` (by @kopylovvlad)
47
+ * Sanitize parameters inside `Devise::Models::Authenticatable#find_or_initialize_with_errors` (by @rlue)
48
+ * `#after_database_authentication` callback was not called after authentication on password reset (by @kanmaniselvan)
49
+ * 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)
50
+ * Fix unclosed `li` tag in `error_messages` partial (by @mracos)
51
+ * Fix Routes issue when devise engine is mounted in another engine on Rails versions lower than 5.1 (by @a-barbieri)
52
+ * Make `#increment_failed_attempts` concurrency safe (by @tegon)
53
+ * Apply Test Helper fix to Rails 6.0 as well as 5.x (by @matthewrudy)
787
54
 
788
- * bug fix
789
- * Ensure password confirmation is always required
790
55
 
791
56
  * deprecations
792
- * authenticatable was deprecated and renamed to database_authenticatable
793
- * confirmable is not included by default on generation
794
-
795
- ### 1.0.6 - 2010-04-02
57
+ * 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)
58
+ * 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)
796
59
 
797
- * bug fix
798
- * Do not allow unlockable strategies based on time to access a controller.
799
- * Do not send unlockable email several times.
800
- * Allow controller to upstram custom! failures to Warden.
801
-
802
- ### 1.0.5 - 2010-03-25
803
-
804
- * bug fix
805
- * Use prepend_before_filter in require_no_authentication.
806
- * require_no_authentication on unlockable.
807
- * Fix a bug when giving an association proxy to devise.
808
- * Do not use lock! on lockable since it's part of ActiveRecord API.
809
-
810
- ### 1.0.4 - 2010-03-02
811
-
812
- * bug fix
813
- * Fixed a bug when deleting an account with rememberable
814
- * Fixed a bug with custom controllers
815
-
816
- ### 1.0.3 - 2010-02-22
60
+ ### 4.5.0 - 2018-08-15
817
61
 
818
62
  * enhancements
819
- * HTML e-mails now have proper formatting
820
- * Do not remove MongoMapper options in find
821
-
822
- ### 1.0.2 - 2010-02-17
823
-
824
- * enhancements
825
- * Allows you set mailer content type (by @glennr)
826
-
827
- * bug fix
828
- * Uses the same content type as request on http authenticatable 401 responses
829
-
830
- ### 1.0.1 - 2010-02-16
831
-
832
- * enhancements
833
- * HttpAuthenticatable is not added by default automatically.
834
- * Avoid mass assignment error messages with current password.
835
-
836
- * bug fix
837
- * Fixed encryptors autoload
838
-
839
- ### 1.0.0 - 2010-02-08
840
-
841
- * deprecation
842
- * :old_password in update_with_password is deprecated, use :current_password instead
843
-
844
- * enhancements
845
- * Added Registerable
846
- * Added Http Basic Authentication support
847
- * Allow scoped_views to be customized per controller/mailer class
848
- * Allow authenticatable to used in change_table statements
849
-
850
- ### 0.9.2 - 2010-02-04
851
-
852
- * bug fix
853
- * Ensure inactive user cannot sign in
854
- * Ensure redirect to proper url after sign up
855
-
856
- * enhancements
857
- * Added gemspec to repo
858
- * Added token authenticatable (by @grimen)
859
-
860
- ### 0.9.1 - 2010-01-24
861
-
862
- * bug fix
863
- * Allow bigger salt size (by @jgeiger)
864
- * Fix relative url root
865
-
866
- ### 0.9.0 - 2010-01-20
867
-
868
- * deprecation
869
- * devise :all is deprecated
870
- * :success and :failure flash messages are now :notice and :alert
871
-
872
- * enhancements
873
- * Added devise lockable (by @mhfs)
874
- * Warden 0.9.0 compatibility
875
- * Mongomapper 0.6.10 compatibility
876
- * Added Devise.add_module as hooks for extensions (by @grimen)
877
- * Ruby 1.9.1 compatibility (by @grimen)
878
-
879
- * bug fix
880
- * Accept path prefix not starting with slash
881
- * url helpers should rely on find_scope!
882
-
883
- ### 0.8.2 - 2010-01-12
884
-
885
- * enhancements
886
- * Allow Devise.mailer_sender to be a proc (by @grimen)
887
-
888
- * bug fix
889
- * Fix bug with passenger, update is required to anyone deploying on passenger (by @dvdpalm)
63
+ * Use `before_action` instead of `before_filter` (by @edenthecat)
64
+ * Allow people to extend devise failure app, through invoking `ActiveSupport.run_load_hooks` once `Devise::FailureApp` is loaded (by @wnm)
65
+ * Use `update` instead of `update_attributes` (by @koic)
66
+ * Split IP resolution from `update_tracked_fields` (by @mckramer)
67
+ * upgrade dependencies for rails and responders (by @lancecarlson)
68
+ * Add `autocomplete="new-password"` to new password fields (by @gssbzn)
69
+ * Add `autocomplete="current-password"` to current password fields (by @gssbzn)
70
+ * Remove redundant `self` from `database_authenticatable` module (by @abhishekkanojia)
71
+ * Update `simple_form` templates with changes from https://github.com/plataformatec/devise/commit/16b3d6d67c7e017d461ea17ed29ea9738dc77e83 and https://github.com/plataformatec/devise/commit/6260c29a867b9a656f1e1557abe347a523178fab (by @gssbzn)
72
+ * Remove `:trackable` from the default modules in the generators, to be more GDPR-friendly (by @fakenine)
890
73
 
891
- ### 0.8.1 - 2010-01-07
892
-
893
- * enhancements
894
- * Move salt to encryptors
895
- * Devise::Lockable
896
- * Moved view links into partial and I18n'ed them
897
-
898
- * bug fix
899
- * Bcrypt generator was not being loaded neither setting the proper salt
900
-
901
- ### 0.8.0 - 2010-01-06
902
-
903
- * enhancements
904
- * Warden 0.8.0 compatibility
905
- * Add an easy for map.connect "sign_in", :controller => "sessions", :action => "new" to work
906
- * Added :bcrypt encryptor (by @capotej)
907
-
908
- * bug fix
909
- * sign_in_count is also increased when user signs in via password change, confirmation, etc..
910
- * More DataMapper compatibility (by @lancecarlson)
911
-
912
- * deprecation
913
- * Removed DeviseMailer.sender
914
-
915
- ### 0.7.5 - 2010-01-01
916
-
917
- * enhancements
918
- * Set a default value for mailer to avoid find_template issues
919
- * Add models configuration to MongoMapper::EmbeddedDocument as well
920
-
921
- ### 0.7.4 - 2009-12-21
74
+ * bug fixes
75
+ * Use same string on failed login regardless of whether account exists when in paranoid mode (by @TonyMK9068)
76
+ * Fix error when params is not a hash inside `Devise::ParameterSanitizer` (by @b0nn1e)
77
+ * Look for `secret_key_base` inside `Rails.application` (by @gencer)
78
+ * Ensure `Devise::ParameterFilter` does not add missing keys when called with a hash that has a `default` / `default_proc`
79
+ configured (by @joshpencheon)
80
+ * Adds `is_navigational_format?` check to `after_sign_up_path_for` to keep consistency (by @iorme1)
922
81
 
923
- * enhancements
924
- * Extract Activatable from Confirmable
925
- * Decouple Serializers from Devise modules
82
+ ### 4.4.3 - 2018-03-17
926
83
 
927
- ### 0.7.3 - 2009-12-15
84
+ * bug fixes
85
+ * Fix undefined method `rails5?` for Devise::Test:Module (by @tegon)
86
+ * Fix: secret key was being required to be set inside credentials on Rails 5.2 (by @tegon)
928
87
 
929
- * bug fix
930
- * Give scope to the proper model validation
88
+ ### 4.4.2 - 2018-03-15
931
89
 
932
90
  * enhancements
933
- * Mail views are scoped as well
934
- * Added update_with_password for authenticatable
935
- * Allow render_with_scope to accept :controller option
936
-
937
- ### 0.7.2 - 2009-12-14
938
-
939
- * deprecation
940
- * Renamed reset_confirmation! to resend_confirmation!
941
- * Copying locale is part of the installation process
91
+ * Support for :credentials on Rails v5.2.x. (by @gencer)
92
+ * Improve documentation about the test suite. (by @tegon)
93
+ * Test with Rails 5.2.rc1 on Travis. (by @jcoyne)
94
+ * Allow test with Rails 6. (by @Fudoshiki)
95
+ * Creating a new section for controller configuration on `devise.rb` template (by @Danilo-Araujo-Silva)
942
96
 
943
- * bug fix
944
- * Fixed render_with_scope to work with all controllers
945
- * Allow sign in with two different users in Devise::TestHelpers
946
-
947
- ### 0.7.1 - 2009-12-09
97
+ * bug fixes
98
+ * Preserve content_type for unauthenticated tests (by @gmcnaughton)
99
+ * Check if the resource is persisted in `update_tracked_fields!` instead of performing validations (by @tegon)
100
+ * Revert "Replace log_process_action to append_info_to_payload" (by @tegon)
948
101
 
949
- * enhancements
950
- * Small enhancements for other plugins compatibility (by @grimen)
102
+ ### 4.4.1 - 2018-01-23
951
103
 
952
- ### 0.7.0 - 2009-12-08
104
+ * bug fixes
105
+ * Ensure Gemspec is loaded as utf-8. (by @segiddins)
106
+ * Fix `ActiveRecord` check on `Confirmable`. (by @tegon)
107
+ * Fix `signed_in?` docs without running auth hooks. by (@machty)
953
108
 
954
- * deprecations
955
- * :authenticatable is not included by default anymore
109
+ ### 4.4.0 - 2017-12-29
956
110
 
957
111
  * enhancements
958
- * Improve loading process
959
- * Extract SessionSerializer from Authenticatable
112
+ * Add `frozen_string_literal` pragma comment to all Ruby files. (by @pat)
113
+ * Use `set_flash_method!` instead of `set_flash_method` in `Devise::OmniauthCallbacksController#failure`. (by @saichander17)
114
+ * Clarify how `store_location_for` modifies URIs. (by @olivierlacan)
115
+ * Move `failed_attempts` increment into its own function. by (@mobilutz)
116
+ * Add `autocomplete="email"` to email fields. by (@MikeRogers0)
117
+ * Add the ability to change the default migrations path introduced in Rails 5.0.3. (by @alexhifer)
118
+ * Delete unnecessary condition for helper method. (by @davydovanton)
119
+ * Support `id: :uuid` option for migrations. (by @filip373)
960
120
 
961
- ### 0.6.3 - 2009-12-02
962
-
963
- * bug fix
964
- * Added trackable to migrations
965
- * Allow inflections to work
966
-
967
- ### 0.6.2 - 2009-11-25
968
-
969
- * enhancements
970
- * More DataMapper compatibility
971
- * Devise::Trackable - track sign in count, timestamps and ips
121
+ * bug fixes
122
+ * Fix syntax for MRI 2.5.0. (by @pat)
123
+ * Validations were being ignored on singup in the `Trackable#update_tracked_fields!` method. (by @AshleyFoster)
124
+ * Do not modify options for `#serializable_hash`. (by @guigs)
125
+ * 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)
972
126
 
973
- ### 0.6.1 - 2009-11-24
127
+ ### 4.3.0 - 2017-05-14
974
128
 
975
- * enhancements
976
- * Devise::Timeoutable - timeout sessions without activity
977
- * DataMapper now accepts conditions
129
+ * Enhancements
130
+ * Dependency support added for Rails 5.1.x.
978
131
 
979
- ### 0.6.0 - 2009-11-22
132
+ ### 4.2.1 - 2017-03-15
980
133
 
134
+ * removals
135
+ * `Devise::Mailer#scope_name` and `Devise::Mailer#resource` are now protected
136
+ methods instead of public.
137
+ * bug fixes
138
+ * Attempt to reset password without the password field in the request now results in a `:blank` validation error.
139
+ Before this change, Devise would accept the reset password request and log the user in, without validating/changing
140
+ the password. (by @victor-am)
141
+ * Confirmation links now expire based on UTC time, working properly when using different timezones. (by @jjuliano)
142
+ * enhancements
143
+ * Notify the original email when it is changed with a new `Devise.send_email_changed_notification` setting.
144
+ When using `reconfirmable`, the notification will be sent right away instead of when the unconfirmed email is confirmed.
145
+ (original change by @ethirajsrinivasan)
146
+
147
+ ### 4.2.0 - 2016-07-01
148
+
149
+ * removals
150
+ * Remove the deprecated `Devise::ParameterSanitizer` API from Devise 3.
151
+ Please use the `#permit` and `#sanitize` methods over `#for`.
152
+ * Remove the deprecated OmniAuth URL helpers. Use the fully qualified helpers
153
+ (`user_facebook_omniauth_authorize_path`) over the scope based helpers
154
+ ( `user_omniauth_authorize_path(:facebook)`).
155
+ * Remove the `Devise.bcrypt` method, use `Devise::Encryptor.digest` instead.
156
+ * Remove the `Devise::Models::Confirmable#confirm!` method, use `confirm` instead.
157
+ * Remove the `Devise::Models::Recoverable#reset_password!` method, use `reset_password` instead.
158
+ * Remove the `Devise::Models::Recoverable#after_password_reset` method.
159
+ * bug fixes
160
+ * Fix an `ActionDispatch::IllegalStateError` when testing controllers with Rails 5 rc 2(by @hamadata).
161
+ * Use `ActiveSupport.on_load` hooks to include Devise on `ActiveRecord` and `Mongoid`,
162
+ avoiding autoloading these constants too soon (by @lucasmazza, @rafaelfranca).
163
+ * enhancements
164
+ * Display the minimum password length on `registrations/edit` view (by @Yanchek99).
165
+ * You can disable Devise's routes reloading on boot by through the `reload_routes = false` config.
166
+ This can reduce the time taken to boot the application but it might trigger
167
+ some errors if you application (mostly your controllers) requires that
168
+ Devise mappings be loaded during boot time (by @sidonath).
169
+ * Added `Devise::Test::IntegrationHelpers` to bypass the sign in process using
170
+ Warden test API (by @lucasmazza).
171
+ * Define `inspect` in `Devise::Models::Authenticatable` to help ensure password hashes
172
+ aren't included in exceptions or otherwise accidentally serialized (by @tkrajcar).
173
+ * Add missing support of `Rails.application.config.action_controller.relative_url_root` (by @kosdiamantis).
981
174
  * deprecations
982
- * :authenticatable is still included by default, but yields a deprecation warning
175
+ * `Devise::TestHelpers` is deprecated in favor of `Devise::Test::ControllerHelpers`
176
+ (by @lucasmazza).
177
+ * The `sign_in` test helper has changed to use keyword arguments when passing
178
+ a scope. `sign_in :admin, users(:alice)` should be rewritten as
179
+ `sign_in users(:alice), scope: :admin` (by @lucasmazza).
180
+ * The option `bypass` of `Devise::Controllers::SignInOut#sign_in` method is
181
+ deprecated in favor of `Devise::Controllers::SignInOut#bypass_sign_in`
182
+ method (by @ulissesalmeida).
983
183
 
984
- * enhancements
985
- * Added DataMapper support
986
- * Remove store_location from authenticatable strategy and add it to failure app
987
- * Allow a strategy to be placed after authenticatable
988
- * Do not rely attribute? methods, since they are not added on Datamapper
184
+ ### 4.1.1 - 2016-05-15
989
185
 
990
- ### 0.5.6 - 2009-11-21
991
-
992
- * enhancements
993
- * Do not send nil to build (DataMapper compatibility)
994
- * Allow to have scoped views
995
-
996
- ### 0.5.5 - 2009-11-20
997
-
998
- * enhancements
999
- * Allow overwriting find for authentication method
1000
- * Remove Ruby 1.8.7 dependency
186
+ * bug fixes
187
+ * Fix overwriting the remember_token when a valid one already exists (by @ralinchimev).
1001
188
 
1002
- ### 0.5.4 - 2009-11-19
189
+ ### 4.1.0
1003
190
 
191
+ * bug fixes
192
+ * Fix race condition of sending the confirmation instructions e-mail using background jobs.
193
+ Using the previous `after_create` callback, the e-mail can be sent before
194
+ the record be committed on database, generating a `ActiveRecord::NotFound` error.
195
+ Now the confirmation e-mail will be only sent after the database commit,
196
+ using the `after_commit` callback.
197
+ It may break your test suite on Rails 4 if you are testing the sent e-mails
198
+ or enqueued jobs using transactional fixtures enabled or `DatabaseCleaner` with `transaction` strategy.
199
+ You can easily fix your test suite using the gem
200
+ [test_after_commit](https://github.com/grosser/test_after_commit). For example, put in your Gemfile:
201
+
202
+ ```ruby
203
+ gem 'test_after_commit', :group => :test
204
+ ```
205
+
206
+ On Rails 5 `after_commit` callbacks are triggered even using transactional
207
+ 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)
208
+ * Fix strategy checking in `Lockable#unlock_strategy_enabled?` for `:none` and
209
+ `:undefined` strategies. (by @f3ndot)
210
+ * features
211
+ * Humanize authentication keys in failure flash message (by @byzg)
212
+ When you are configuring the translations of `devise.failure.invalid`, the
213
+ `authentication_keys` is translated now.
1004
214
  * deprecations
1005
- * Deprecate :singular in devise_for and use :scope instead
215
+ * Remove code supporting old session serialization format (by @fphilipe).
216
+ * Now the `email_regexp` default uses a more permissive regex:
217
+ `/\A[^@\s]+@[^@\s]+\z/` (by @kimgb)
218
+ * Now the `strip_whitespace_keys` default is `[:email]` (by @ulissesalmeida)
219
+ * Now the `reconfirmable` default is `true` (by @ulissesalmeida)
220
+ * Now the `skip_session_storage` default is `[:http_auth]` (by @ulissesalmeida)
221
+ * Now the `sign_out_via` default is `:delete` (by @ulissesalmeida)
222
+ * improvements
223
+ * Avoids extra computation of friendly token for confirmation token (by @sbc100)
1006
224
 
1007
- * enhancements
1008
- * Create after_sign_in_path_for and after_sign_out_path_for hooks to be
1009
- overwriten in ApplicationController
1010
- * Create sign_in_and_redirect and sign_out_and_redirect helpers
1011
- * Warden::Manager.default_scope is automatically configured to the first given scope
1012
-
1013
- ### 0.5.3 - 2009-11-18
225
+ ### 4.0.3 - 2016-05-15
1014
226
 
1015
- * bug fix
1016
- * MongoMapper now converts DateTime to Time
1017
- * Ensure all controllers are unloadable
227
+ * bug fixes
228
+ * Fix overwriting the remember_token when a valid one already exists (by @ralinchimev).
1018
229
 
1019
- * enhancements
1020
- * Moved friendly_token to Devise
1021
- * Added Devise.all, so you can freeze your app strategies
1022
- * Added Devise.apply_schema, so you can turn it to false in Datamapper or MongoMapper
1023
- in cases you don't want it be handlded automatically
230
+ ### 4.0.2 - 2016-05-02
1024
231
 
1025
- ### 0.5.2 - 2009-11-17
1026
-
1027
- * enhancements
1028
- * Improved sign_in and sign_out helpers to accepts resources
1029
- * Added stored_location_for as a helper
1030
- * Added test helpers
1031
-
1032
- ### 0.5.1 - 2009-11-15
1033
-
1034
- * enhancements
1035
- * Added serializers based on Warden ones
1036
- * Allow authentication keys to be set
1037
-
1038
- ### 0.5.0 - 2009-11-13
232
+ * bug fixes
233
+ * Fix strategy checking in `Lockable#unlock_strategy_enabled?` for `:none`
234
+ and `:undefined` strategies. (by @f3ndot)
1039
235
 
1040
- * bug fix
1041
- * Fixed a bug where remember me module was not working properly
236
+ ### 4.0.1 - 2016-04-25
1042
237
 
1043
- * enhancements
1044
- * Moved encryption strategy into the Encryptors module to allow several algorithms (by @mhfs)
1045
- * Implemented encryptors for Clearance, Authlogic and Restful-Authentication (by @mhfs)
1046
- * Added support for MongoMapper (by @shingara)
1047
-
1048
- ### 0.4.3 - 2009-11-10
238
+ * bug fixes
239
+ * Fix the e-mail confirmation instructions send when a user updates the email
240
+ address from nil. (by @lmduc)
241
+ * Remove unnecessary `attribute_will_change!` call. (by @cadejscroggins)
242
+ * Consistent `permit!` check. (by @ulissesalmeida)
1049
243
 
1050
- * bug fix
1051
- * Authentication just fails if user cannot be serialized from session, without raising errors;
1052
- * Default configuration values should not overwrite user values;
244
+ ### 4.0.0 - 2016-04-18
1053
245
 
1054
- ### 0.4.2 - 2009-11-06
246
+ * bug fixes
247
+ * Fix the `extend_remember_period` configuration. When set to `false` it does
248
+ not update the cookie expiration anymore.(by @ulissesalmeida)
1055
249
 
1056
250
  * deprecations
1057
- * Renamed mail_sender to mailer_sender
1058
-
1059
- * enhancements
1060
- * skip_before_filter added in Devise controllers
1061
- * Use home_or_root_path on require_no_authentication as well
1062
- * Added devise_controller?, useful to select or reject filters in ApplicationController
1063
- * Allow :path_prefix to be given to devise_for
1064
- * Allow default_url_options to be configured through devise (:path_prefix => "/:locale" is now supported)
1065
-
1066
- ### 0.4.1 - 2009-11-04
1067
-
1068
- * bug fix
1069
- * Ensure options can be set even if models were not loaded
1070
-
1071
- ### 0.4.0 - 2009-11-03
251
+ * Added a warning of default value change in Devise 4.1 for users that uses
252
+ the the default configuration of the following configurations: (by @ulissesalmeida)
253
+ * `strip_whitespace_keys` - The default will be `[:email]`.
254
+ * `skip_session_storage` - The default will be `[:http_auth]`.
255
+ * `sign_out_via` - The default will be `:delete`.
256
+ * `reconfirmable` - The default will be `true`.
257
+ * `email_regexp` - The default will be `/\A[^@\s]+@[^@\s]+\z/`.
258
+ * Removed deprecated argument of `Devise::Models::Rememberable#remember_me!` (by @ulissesalmeida)
259
+ * Removed deprecated private method Devise::Controllers::Helpers#expire_session_data_after_sign_in!
260
+ (by @bogdanvlviv)
261
+
262
+ ### 4.0.0.rc2 - 2016-03-09
263
+
264
+ * enhancements
265
+ * Introduced `DeviseController#set_flash_message!` for conditional flash
266
+ messages setting to reduce complexity.
267
+ * `rails g devise:install` will fail if the app does not have a ORM configured
268
+ (by @arjunsharma)
269
+ * Support to Rails 5 versioned migrations added.
1072
270
 
1073
271
  * deprecations
1074
- * Notifier is deprecated, use DeviseMailer instead. Remember to rename
1075
- app/views/notifier to app/views/devise_mailer and I18n key from
1076
- devise.notifier to devise.mailer
1077
- * :authenticable calls are deprecated, use :authenticatable instead
1078
-
1079
- * enhancements
1080
- * Allow devise to be more agnostic and do not require ActiveRecord to be loaded
1081
- * Allow Warden::Manager to be configured through Devise
1082
- * Created a generator which creates an initializer
272
+ * omniauth routes are no longer defined with a wildcard `:provider` parameter,
273
+ 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`.
274
+ You can still use `omniauth_authorize_path(:user, :github)` if you need to
275
+ call the helpers dynamically.
1083
276
 
1084
- ### 0.3.0 - 2009-10-30
277
+ ### 4.0.0.rc1 - 2016-02-01
1085
278
 
1086
- * bug fix
1087
- * Allow yml messages to be configured by not using engine locales
279
+ * Support added to Rails 5 (by @twalpole).
280
+ * Devise no longer supports Rails 3.2 and 4.0.
281
+ * Devise no longer supports Ruby 1.9 and 2.0.
1088
282
 
1089
283
  * deprecations
1090
- * Renamed confirm_in to confirm_within
1091
- * Do not send confirmation messages when user changes their e-mail
1092
- * Renamed authenticable to authenticatable and added deprecation warnings
1093
-
1094
- ### 0.2.3 - 2009-10-29
1095
-
1096
- * enhancements
1097
- * Ensure fail! works inside strategies
1098
- * Make unauthenticated message (when you haven't signed in) different from invalid message
1099
-
1100
- * bug fix
1101
- * Do not redirect on invalid authenticate
1102
- * Allow model configuration to be set to nil
1103
-
1104
- ### 0.2.2 - 2009-10-28
1105
-
1106
- * bug fix
1107
- * Fix a bug when using customized resources
1108
-
1109
- ### 0.2.1 - 2009-10-27
1110
-
1111
- * refactor
1112
- * Clean devise_views generator to use devise existing views
1113
-
1114
- * enhancements
1115
- * Create instance variables (like @user) for each devise controller
1116
- * Use Devise::Controller::Helpers only internally
1117
-
1118
- * bug fix
1119
- * Fix a bug with Mongrel and Ruby 1.8.6
1120
-
1121
- ### 0.2.0 - 2009-10-24
1122
-
1123
- * enhancements
1124
- * Allow option :null => true in authenticable migration
1125
- * Remove attr_accessible calls from devise modules
1126
- * Customizable time frame for rememberable with :remember_for config
1127
- * Customizable time frame for confirmable with :confirm_in config
1128
- * Generators for creating a resource and copy views
1129
-
1130
- * optimize
1131
- * Do not load hooks or strategies if they are not used
1132
-
1133
- * bug fixes
1134
- * Fixed requiring devise strategies
1135
-
1136
- ### 0.1.1 - 2009-10-21
1137
-
1138
- * bug fixes
1139
- * Fixed requiring devise mapping
1140
-
1141
- ### 0.1.0 - 2009-10-21
1142
-
1143
- * Devise::Authenticable
1144
- * Devise::Confirmable
1145
- * Devise::Recoverable
1146
- * Devise::Validatable
1147
- * Devise::Migratable
1148
- * Devise::Rememberable
1149
-
1150
- * SessionsController
1151
- * PasswordsController
1152
- * ConfirmationsController
1153
-
1154
- * Create an example app
1155
- * devise :all, :except => :rememberable
1156
- * Use sign_in and sign_out in SessionsController
1157
-
1158
- * Mailer subjects namespaced by model
1159
- * Allow stretches and pepper per model
1160
-
1161
- * Store session[:return_to] in session
1162
- * Sign user in automatically after confirming or changing it's password
284
+ * The `devise_parameter_sanitize` API has changed:
285
+ The `for` method was deprecated in favor of `permit`:
286
+
287
+ ```ruby
288
+ def configure_permitted_parameters
289
+ devise_parameter_sanitizer.for(:sign_up) << :subscribe_newsletter
290
+ # Should become the following.
291
+ devise_parameter_sanitizer.permit(:sign_up, keys: [:subscribe_newsletter])
292
+ end
293
+ ```
294
+
295
+ The customization through instance methods on the sanitizer implementation
296
+ should be done through it's `initialize` method:
297
+
298
+ ```ruby
299
+ class User::ParameterSanitizer < Devise::ParameterSanitizer
300
+ def sign_up
301
+ default_params.permit(:username, :email)
302
+ end
303
+ end
304
+
305
+ # The `sign_up` method can be a `permit` call on the sanitizer `initialize`.
306
+
307
+ class User::ParameterSanitizer < Devise::ParameterSanitizer
308
+ def initialize(*)
309
+ super
310
+ permit(:sign_up, keys: [:username, :email])
311
+ end
312
+ end
313
+ ```
314
+
315
+ You can check more examples and explanations on the [README section](README.md#strong-parameters)
316
+ and on the [ParameterSanitizer docs](lib/devise/parameter_sanitizer.rb).
317
+
318
+ Please check [3-stable](https://github.com/plataformatec/devise/blob/3-stable/CHANGELOG.md)
319
+ for previous changes.