Call a function when Flask session expires
Yeah its kind of possible run a loop to see until session['key']==None and if the condition becomes true call the function. I hope this helps!!!
In my Flask application, I am saving files that correspond to a user, and want to delete these files when the user's "session" expires. Is it possible to detect the session expiration and immediately call a function?