On Mar 2, 5:09 pm, psujohn <[email protected]> wrote:
> > Since I'm building rails app just for learning proporses this could
> > work, but what happend if this were a real app and another person
> > tries to log-in using the same user-pass, it would allow 2 or more
> > people logged with the same user.
>
> Two different problems.
>
> 1) Different people are able to login at the same time with the same
> username using different PCs. To prevent that you need to write into
> the database when someone is logged in and have them logout or
> timeout.

As someone who's used an app with this behavior - just don't do it.
Network
outages = fail, PC craps out = epic fail. The app in question was even
more
restrictive - it tracked the IP the user was logged in, and wouldn't
permit
logins on other IPs. A tech had to manually unlock accounts to get
users
back online. NOT GOOD.

There's also no reason to ever do this - if a malicious attacker
already has a
user's login AND password, the game is over. "One session per account"
is
just going to annoy legitimate users (who forget to logout before
going to work, etc.)

--Matt Jones
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to