[Rails] Re: invalidating a session on multiple login

Martin DeMello
Fri, 23 Jun 2006 09:13:51 -0000

On 6/23/06, Al Evans <anejr@alevans.com> wrote:
> Martin DeMello wrote:
> > How do I do the following: if a user is logged in, then opens another
> > browser tab and logs in again (either as himself or as someone else),
> > I want to invalidate the session in the first tab and throw up a
> > "logged in from another browser window" screen. RIght now,
user1''s
> > session silently becomes a duplicate user2 session instead (from what
> > I understand, sessions are bound to browser-specific cookies, so that
> > is understandable, but definitely not desirable).
>
> Wouldn''t it solve your problem to show a "log out"
button instead of a
> login option when a user is already logged in?

ooh - interesting idea. that does sound like the cleanest solution. thanks!

martin