devise 3.2.1 → 4.4.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of devise might be problematic. Click here for more details.

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