I'm implementing session management and am currently storing 4 types of info in the db:
- user_id
- session_id (hash)
- insertion_time (for timeouts)
- persistency (if user has a persistent cookie)
It is possible for the user to have multiple sessions open with different devices. If the user logs out, how do I know which of those sessions I should delete?
What unique information is usually stored along with the info I've already got? IP address does not really work as it could be shared. Should I store the browser info, but what if it is the same?