# Decrease default session timeout

**URL:** https://meta.discourse.org/t/decrease-default-session-timeout/62621
**Category:** SSO
**Created:** [May 12, 2017, 11:57pm UTC](https://meta.discourse.org/t/decrease-default-session-timeout/62621 "2017-05-12T23:57:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Volodymyr\_Fedak](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Volodymyr\_Fedak](https://meta.discourse.org/u/Volodymyr_Fedak)
#### Post date: [May 12, 2017, 11:57pm UTC](https://meta.discourse.org/t/decrease-default-session-timeout/62621/1 "2017-05-12T23:57:10Z")

</div>

Hello,

We’re launching discourse as a docker image where we have possibility to modify app.yml.  
Also we’re using SSO feature to log in/out users to discourse forum. And the problem is that existing framework doesn’t allow to trigger user logout from forum when user session is expired in main app. (When user makes logout it’s ok but when user closes browser his forum session is still open ).  
That’s why there is a case that it will be good to decrease default session expiration period at least expire discourse user session when he’s inactive 1 hr.

Is it possible to do it using some configuration ?

Generally I’ve read this: [Session Timeout](https://meta.discourse.org/t/session-timeout/34686) discussion however it doesn’t provide an clear answer how to deal with that problem.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 13, 2017, 12:00am UTC](https://meta.discourse.org/t/decrease-default-session-timeout/62621/2 "2017-05-13T00:00:59Z")

</div>

We had talked about making session timeout duration a site setting but I don’t think we did.. @sam would know he worked on this recently.

---

<div class="post-metadata">

### Author: ![Volodymyr\_Fedak](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Volodymyr\_Fedak](https://meta.discourse.org/u/Volodymyr_Fedak)
#### Post date: [May 13, 2017, 12:20am UTC](https://meta.discourse.org/t/decrease-default-session-timeout/62621/3 "2017-05-13T00:20:53Z")

</div>

Even if it’s possible to make it using configuration setting it’s fine (just not to change ruby code ). Or is it possible during setup specify (these properties): [discourse/config/site\_settings.yml at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/config/site_settings.yml)  
maximum\_session\_age:  
default: 1440  
min: 1  
max: 175200

Because we’re set it up using docker and I’m not sure whether these props will take affect.
