public async Task RemoveSessionsAsync(int userId, long[] sessionsIds) { await jweBlackListService.AddUserTokensToBlackListAsync(userId, sessionsIds); await db.LongSessions.Where(x => x.UserId == userId && sessionsIds.Contains(x.Id)).DeleteAsync(); }
public virtual async Task LogoutAsync(int userId, long sessionId) { await jweBlackListService.AddUserTokensToBlackListAsync(userId, new[] { sessionId }); await db.LongSessions.Where(x => x.UserId == userId && x.Id == sessionId).DeleteAsync(); }