diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 328302c03..18a43571c 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -3,6 +3,9 @@ # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| + + + # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render invalid all existing # confirmation, reset password and unlock tokens in the database. @@ -10,6 +13,10 @@ # by default. You can change it below and use your own secret key. # config.secret_key = '5c21c4628df5c96817e6bffdf1d697d5ee4272bebde637b44f8139a18a476bcce540dc16447a6f78353756d7201671347289a949e2c1a4916bc98366bcc891e7' + # Tell devise where to get secret_key_base to avoid Rails 7.1 deprecation warning + # when it tries deprecated places. https://github.com/heartcombo/devise/issues/5644 + config.secret_key = Rails.application.secret_key_base + # ==> Controller configuration # Configure the parent class to the devise controllers. # config.parent_controller = 'DeviseController'