public async Task Logout(int userId) { var user = _unitOfWork.Repository <ApplicationUser>().Get(x => x.Id == userId) .TagWith(nameof(Logout) + "_GetUser") .Include(x => x.Tokens) .FirstOrDefault(); if (user == null) { throw new CustomException(HttpStatusCode.BadRequest, "user", "User is not found"); } await _jwtService.ClearUserTokens(user); }