devise 3.5.2 → 4.0.0

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