What are some pros and cons of logging out a user from one browser if they log into the same account in another browser? How common is it?
Pros: Improved security: Logging out a user from one browser when they log into the same account in another browser can help prevent unauthorized access to their account. Prevents multiple active sessions: It helps prevent confusion by ensuring that the user only has one active session at a time, reducing the risk of conflicting actions. Enhanced user experience: It ensures that the user is always using the most up-to-date session and data when accessing their account. Cons: Inconvenience for users: Logging out a user from one browser may disrupt their workflow and require them to log in again, which can be frustrating. Lack of flexibility: Some users may prefer to have multiple active sessions for convenience and ease of access. Data loss risk: If the user forgets to save their work before being logged out, they may lose any unsaved data.
Good for security but what's the business problem you're trying to solve? If I log into a site on my phone and decide it'll be easier to finish the task on my laptop I expect to still be logged in on my phone when I return to it. Spotify allow you to only be logged in on one device and that's to stop people sharing the service with friends and family etc. There's a clear "business problem" and they've solved it well. You will need to store log in info in your database along with the IP and user_info so that you know which login to honour.
Excellent points both of you. Thank you. I don't want to have an unlimited login, for security reasons, as you also mentioned. I'm thinking about 3-5 logins for the same account on different devices / browsers.
I often use a laptop and desktop. And it's very annoying when a website logs me out every time I switch machines