What I want to do is to limit a user ID to only being able to log in to one device at a time. For example, user ID "abc" logs in to their computer. User ID "abc" now tries to log in from their phone. What I want to happen is to kill the session on their computer.
I'm using Asp.net mvc and identity membership. I've an idea to create a table logins. save userId , current session or claim id and when someone logs in delete all sessions according to the userId, except current.
Can someone provide actual code how to implement such functionality?