How to limit the number of active sessions a user can have

I am creating a license type system where a user can buy one or more licenses. They can then only log in once with each license (similar to Spotify). Thus, the user buys 2 licenses. They can log in once in Firefox and once in Chrome. If they try to log in through IE, the system will prompt / warn that they will log out of another session.

I understand that a user can just use multiple instances of the same browser to access multiple sessions / screens, but that's fine. We are really trying to prevent users from using multiple devices (2 + separate PCs) if their license is limited.

Any idea how I would go about doing this? Can I check the session data from another instance, or store the records in a separate table and check for that?

thank

+3


source to share





All Articles