Skip to content

Commit

Permalink
Update devise from rails generate devise:install
Browse files Browse the repository at this point in the history
  • Loading branch information
simple10 committed Oct 20, 2014
1 parent bdf9f79 commit 4d19548
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions config/initializers/devise.rb
Expand Up @@ -58,15 +58,12 @@

# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:token]` will
# enable it only for token authentication. The supported strategies are:
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# :token = Support basic authentication with token authentication key
# :token_options = Support token authentication with options as defined in
# http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Token.html
# config.http_authenticatable = false

# If http headers should be returned for AJAX requests. True by default.
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true

# The realm used in Http Basic Authentication. 'Application' by default.
Expand All @@ -78,10 +75,10 @@
config.paranoid = true

# By default Devise will store the user in session. You can skip storage for
# :http_auth and :token_auth by adding those symbols to the array below.
# 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
Expand All @@ -96,7 +93,9 @@
#
# 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).
# 12 ~= 300ms on dev machine
# 13 ~= 600ms
config.stretches = Rails.env.test? ? 1 : 12
Expand Down Expand Up @@ -131,17 +130,20 @@

# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
config.remember_for = 1.year
config.remember_for = 30.days

# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true

# 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 = { secure: true }

# ==> 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
Expand Down Expand Up @@ -180,6 +182,9 @@
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour

# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = true

# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
Expand All @@ -200,10 +205,6 @@
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512

# ==> Configuration for :token_authenticatable
# Defines name of the authentication token params key
# config.token_authentication_key = :auth_token

# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
Expand Down Expand Up @@ -235,15 +236,15 @@
# ==> 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
Expand Down

0 comments on commit 4d19548

Please sign in to comment.