Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to prevent multiple logins  RSS feed

 
Jenny Kalinina
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could somebody help me with that:
how to prevent the user from opening more then one instance of web application
Thanks
 
Romano Fabian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just wanted to be clear: Are you preventing two or more users to open your web application in the same machine? Or are you preventing a user to open multiple instance of your application regardless of how many machines?
romano
 
Jenny Kalinina
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on the same machine
Thanks
 
Romano Fabian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure about this but I think if you use cookies, if a user already logged but did not logged out and another user logged in the same machine, the previous user's cookies will be overwritten.thus disabling the previous user's session.
 
Jenny Kalinina
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I think it will work, but I need to prevent users from having open more then one the same application on the same machine.
Any ideas how to do that?
Thanks
 
Manish Malhotra
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use session object or u can make it possible by using ur database, becz using cookies is not preferable as it could be diabled.
I think database is the right way.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure that sessions would work. If a user has both IE and Netscape open, the user has two sessions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!