How do I delete all sessions and cookies set by my Flask/python app. So that when users return they have to re-login. I want to do this each time I push a new version of the code to production otherwise.
Best way I found is to invalidate the secret key like so
app.secret_key = os.urandom(32)
The key is secure enough, and each time you launch your system the key changes invalidating all sessions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With