Hello! My task is to logout from first user session when user made login into another. I have read about login event listeners in this documentation. I implemented this using UserLoggedInEvent. When user logged in I am trying to search users previous tokens in ServerTokenStore and delete it if user has previous tokens, so that when our web-client tries to make next request it gets unathorized and redirects to main page:
However, this solution does not work after testing it sometimes. Somehow browser remembers previous sessions (maybe in the cache or smth) and does not logout after refreshing (on the first session).
I don’t know how to fix my issue. So I am currently open for the best-practice solutions if you have.
Thanks in advance.