mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Make devise session timeout configurable through env variable [SCI-7028]
This commit is contained in:
parent
47b426539f
commit
da9ad5797c
1 changed files with 5 additions and 1 deletions
|
@ -202,7 +202,11 @@ Devise.setup do |config|
|
|||
# ==> Configuration for :timeoutable
|
||||
# The time you want to timeout the user session without activity. After this
|
||||
# time the user will be asked for credentials again. Default is 30 minutes.
|
||||
config.timeout_in = 3.hours
|
||||
config.timeout_in = if ENV['SCINOTE_SESSION_TIMEOUTS_IN'].present?
|
||||
ENV['SCINOTE_SESSION_TIMEOUTS_IN'].to_i.seconds
|
||||
else
|
||||
3.hours
|
||||
end
|
||||
|
||||
# If true, expires auth token on session timeout.
|
||||
# config.expire_auth_token_on_timeout = false
|
||||
|
|
Loading…
Reference in a new issue