|
|
|
@ -4,9 +4,7 @@ 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 = 'a462883bde2ce796fa8aa481d8946a500ac8a4141ccc5f2fb1988b' \
|
|
|
|
|
+ 'ed8f3595b9cbd713abdca92b2d276d339a4e342768173e1b13b7a45956f6d3bda4653b' \
|
|
|
|
|
+ '14b6'
|
|
|
|
|
# config.secret_key = 'not used in rails 4'
|
|
|
|
|
|
|
|
|
|
# ==> Mailer Configuration
|
|
|
|
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
|
|
|
@ -69,7 +67,7 @@ Devise.setup do |config|
|
|
|
|
|
# :database = Support basic authentication with authentication key + password
|
|
|
|
|
# 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.
|
|
|
|
@ -84,7 +82,7 @@ Devise.setup do |config|
|
|
|
|
|
# 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
|
|
|
|
@ -109,10 +107,10 @@ Devise.setup do |config|
|
|
|
|
|
|
|
|
|
|
# ==> 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
|
|
|
|
@ -137,15 +135,18 @@ Devise.setup do |config|
|
|
|
|
|
# The time the user will be remembered without asking for credentials again.
|
|
|
|
|
# config.remember_for = 2.weeks
|
|
|
|
|
|
|
|
|
|
# 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 = {}
|
|
|
|
|
|
|
|
|
|
# ==> 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
|
|
|
|
@ -187,7 +188,7 @@ Devise.setup do |config|
|
|
|
|
|
# config.unlock_in = 1.hour
|
|
|
|
|
|
|
|
|
|
# Warn on the last attempt before the account is locked.
|
|
|
|
|
# config.last_attempt_warning = false
|
|
|
|
|
# config.last_attempt_warning = true
|
|
|
|
|
|
|
|
|
|
# ==> Configuration for :recoverable
|
|
|
|
|
#
|
|
|
|
@ -240,8 +241,7 @@ Devise.setup do |config|
|
|
|
|
|
# ==> 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
|
|
|
|
@ -250,8 +250,7 @@ Devise.setup do |config|
|
|
|
|
|
#
|
|
|
|
|
# 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
|
|
|
|
|