Saturday, November 24, 2012

set_expiry() auto logout on browser close

Hi All,

I'm trying to log the user out automatically when the browser closes.  I call 'request.session.set_expiry(0)' on login and I'm using 'SESSION_EXPIRE_AT_BROWSER_CLOSE = True' in my settings.  It's not happening.  The 'How to use sessions' doc (1.4) says this call makes the session cookie expire when the user's web browser is closed.  When I abandon my logged-in session and come back the next day without logging in, I'm still logged in!  What's the mechanism here?  Doesn't 'session expired' mean logged out?  Do I need to install middleware such as django-session-security?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate