private void UpdateRefreshSession(Guid userId, string refreshToken) { var oldRefreshSession = _refreshSessionRepository.GetByUserId(userId); if (oldRefreshSession != null) { _refreshSessionRepository.Remove(oldRefreshSession.Id); } var refreshSession = _tokenService.BuildNewRefreshSession(userId, refreshToken); _refreshSessionRepository.Add(refreshSession); }