I have a scenario where I needed to do something like this. My solution was to add the session id associated with the user through CustomUserSession.
Then I use the REDIS client and go through all the sessions until I find it with the user ID, and then I complete all the sessions, perform any update and save the session again.
using (var redis = _appHost.TryResolve<IRedisClientsManager>().GetClient()) { var sessionkeys = redis.SearchKeys("urn:iauthsession:*"); foreach (var key in sessionkeys) { var session = redis.Get<CustomUserSession>(key); if (session != null) { if (session.StudentId == SessionToFindId) {
source share