Refactoring part 1
Some changes for workers, but stopped due to refactoring
This commit is contained in:
12
common/utils/app_hooks.py
Normal file
12
common/utils/app_hooks.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from flask import session
|
||||
|
||||
|
||||
def make_session_permanent():
|
||||
session.permanent = True # Refresh the session timeout on every request
|
||||
# if 'user_id' in session and session.get('was_authenticated'):
|
||||
# if session.modified: # Check if the session was modified
|
||||
# session['was_authenticated'] = True
|
||||
# else:
|
||||
# session.pop('user_id', None) # Clear session
|
||||
# session.pop('was_authenticated', None)
|
||||
# return redirect(url_for('login')) # Redirect to login page if session expired
|
||||
Reference in New Issue
Block a user