mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 23:38:10 -05:00
Changing default timeout to 30.minutes.
This commit is contained in:
@@ -47,7 +47,7 @@ module Devise
|
||||
|
||||
# Time interval to timeout the user session without activity.
|
||||
mattr_accessor :timeout
|
||||
@@timeout = 10.minutes
|
||||
@@timeout = 30.minutes
|
||||
|
||||
# Used to define the password encryption algorithm.
|
||||
mattr_accessor :encryptor
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# record is set, we set the last request time inside it's scoped session to
|
||||
# verify timeout in the following request.
|
||||
Warden::Manager.after_set_user do |record, warden, options|
|
||||
if record.present? && record.respond_to?(:timeout?)
|
||||
if record && record.respond_to?(:timeout?)
|
||||
scope = options[:scope]
|
||||
# Record may have already been logged out by another hook (ie confirmable).
|
||||
if warden.authenticated?(scope)
|
||||
|
||||
Reference in New Issue
Block a user