Subscribe to session timeout #26265
Unanswered
berlicon
asked this question in
Q&A / Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I need do some stuff when user logged out. I can do it via signals:
https://flask-login.readthedocs.io/en/latest/#flask_login.user_logged_out
@user_logged_out.connect
def mark_logout(sender, user, **extra):
print('LOGOUT')
#or so:
def mark_logout(sender, user, **extra):
print('LOGOUT')
user_logged_out.connect(mark_logout)
All works correctly. After user press button [Logout] I see in cmd where Superset back runned my log message.
But we hide button [Logout] in our webapp. So, I want when user leaves browser with Superset write that message to LOKI.
I can not wait when browser session expires (50min?). So I put that code to file \superset\config.py
PERMANENT_SESSION_LIFETIME = 10
And after 10sec session expires and I can see that browser redirects to login page.
But I can not see 'LOGOUT' in Superset cmd log. It seems when session expires, app does not get signal about logout.
How I can write some code when user logout when session expires?
Beta Was this translation helpful? Give feedback.
All reactions