How do I clear a flask session?
You can also iterate through the session and call session.pop()
for each key in your session. Pop will remove the variable from the session and you don't have to keep updating your secret key.
for key in list(session.keys()):
session.pop(key)
from flask import session
session.clear()
I use session like this with flask, it does work.
I don't use SecureCookieSession
though, but maybe it can help.