public async Task <IdentityUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); if (string.IsNullOrEmpty(normalizedUserName)) { throw new ArgumentNullException(nameof(normalizedUserName)); } try { var result = await _userRepository.GetByUserNameAsync(normalizedUserName); return(result); } catch (Exception ex) { Logging.LogException(ex); return(null); } }