I have a use case where I want the user to get logged out when they close their browser. And next time when the user visit the website, the user should be redirected to landing page / login page of my application.
From my side, I have implemented the following in django settings.py
file:
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_COOKIE_AGE = 40
SESSION_SAVE_EVERY_REQUEST = True
LOGOUT_REDIRECT_URL = '/logout_user/'
But this not helping. Any idea how to achieve this scenario?