config/initializers/devise.rb in georgia-0.7.8 vs config/initializers/devise.rb in georgia-0.8.0
- old
+ new
@@ -2,17 +2,17 @@
# 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.
- config.secret_key = '48b4b40aeed8b1b4f11fa07ce0f75684e2a6a7ce0820506e7c58149879eff83d64ccc336b75039a0f9f8fcc8ede0429af92c784a28db9132a5399fb7878475f0'
+ # config.secret_key = '46abeebc2b3664faeb421514a3b7c92faee7e571c80e4192bf5365f9e4a6ce349d5273ff9ee3d900a8e861e8dcd909906843a894b67fb8578e547a1a7916deb4'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
- config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
+ config.mailer_sender = 'no-reply@georgiacms.org'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# ==> ORM configuration
@@ -74,11 +74,11 @@
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
- # passing :skip => :sessions to `devise_for` in your config/routes.rb
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
@@ -89,22 +89,24 @@
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
# using other encryptors, it sets how many times you want the password re-encrypted.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
- # a value less than 10 in other environments.
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
config.stretches = Rails.env.test? ? 1 : 10
# Setup a pepper to generate the encrypted password.
- # config.pepper = 'd89feba32ca1e861e6cb7af3fd87f2d8ce319377c12c39fff66f937f941524392bd5d42a6867682527e89641ae31e7c8e1c90429fc70dac3b6efb21d6019cc9e'
+ # config.pepper = '45253a3ee9b5c7ca3ee0d674bece4cec6c97b4953cd7f2aa860221a79faa2f45a3cb2ac46da3969e1ef34081d5625e9db61d923030e3b421708524c87bd44cb1'
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
- # confirming his account. For instance, if set to 2.days, the user will be
- # able to access the website for two days without confirming his account,
+ # confirming their account. For instance, if set to 2.days, the user will be
+ # able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
- # the user cannot access the website without confirming his account.
+ # the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
@@ -113,12 +115,12 @@
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
- # db field (see migrations). Until confirmed new email is stored in
- # unconfirmed email column, and copied to email column on successful confirmation.
+ # db field (see migrations). Until confirmed, new email is stored in
+ # unconfirmed_email column, and copied to email column on successful confirmation.
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [ :email ]
@@ -128,15 +130,15 @@
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
- # :secure => true in order to force SSL only cookies.
+ # secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
- # Range for password length. Default is 8..128.
+ # Range for password length.
config.password_length = 8..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
@@ -225,29 +227,29 @@
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
- # config.router_name = :my_engine
+ config.router_name = :georgia
#
# When using omniauth, Devise cannot automatically set Omniauth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end