[Rails] Re: invalidating a session on multiple login

Martin DeMello
Fri, 23 Jun 2006 09:40:40 -0000

Okay, this is even harder than I thought. Consider the following use
case: user1 logs in. He opens a new tab and tries to log in again.
Either by making him click logout or transparently, I reset the
session, and log him in as user2. The previous tab will still be
changed to user2, since the session reset can''t affect the client side
- I''m beginning to think the only thing to do is store the logged in
user in javascript and do a timed ajax call to see if it matches the
session user and invalidate the page on the client side if not. Anyone
have a better idea?

martin