superset icon indicating copy to clipboard operation
superset copied to clipboard

[Session] How to set session timeout?

Open qin4zhang opened this issue 8 years ago • 5 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if any
  • [x] I have reproduced the issue with at least the latest released version of superset
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.25.5

Expected results

I could set session timeout in config.py, and when the time is out , user should login again.

Actual results

I don't know how to set it

Steps to reproduce

What's your advice?

qin4zhang avatar Jun 06 '18 11:06 qin4zhang

We use flask-appbuilder which uses flask-login, so all you have to do is add these configurations to your superset_config.py: https://flask-login.readthedocs.io/en/latest/#cookie-settings

If you have time please add an FAQ entry in the docs!

mistercrunch avatar Jun 06 '18 16:06 mistercrunch

@mistercrunch OK!

qin4zhang avatar Jun 07 '18 02:06 qin4zhang

set PERMANENT_SESSION_LIFETIME in the Superset config file

hushaoqing avatar May 30 '19 09:05 hushaoqing

set PERMANENT_SESSION_LIFETIME in the Superset config file

Is there a way where we can set some alerts before the session timeout ?

Ritesh205 avatar Jun 27 '19 17:06 Ritesh205

See context from https://stackoverflow.com/questions/34118093/flask-permanent-session-where-to-define-them

In superset, you can use FLASK_APP_MUTATOR to enable session.permanent = True to make Flask setup session expiration time. see my PR #16286

shawnzhu avatar Aug 17 '21 02:08 shawnzhu