title: ASP.NET Web API CheckPasswordAsync via UserManager doesn't progress
body: <p>I'm building a REST API with ASP.NET Core, and I ran into the following issue:
  This us my login method in my AuthManager class (which is used to abstract the UserManager from the AccountController):</p>
  <pre><code>public async Task&lt;AuthResponseDto&gt; Login(LoginDto loginDto)
          {
              _user = await _userManager.FindByEmailAsync(loginDto.Email);
              bool isValidUser = await _userManager.CheckPasswordAsync(_user, loginDto.Password);
              
              if(_user == null || isValidUser == false)
                  return null; //user doesn't exist/password wrong so nothing comes back
  
              var token = await GenerateToken();
              return new AuthResponseDto
              {
                  Token = token,
                  UserId = _user.Id,
                  RefreshToken = await CreateRefreshToken()
              };
          }
  </code></pre>
  <p>It works perfectly with the right credentials, but when entering the wrong creds in my front-end app I can see that the breakpoint gets to line 2 of the method and just stops.
  This line to be exact:</p>
  <pre><code>            bool isValidUser = await _userManager.CheckPasswordAsync(_user, loginDto.Password);
  
  </code></pre>
  <p>While debugging I hover over and I see that <code>isValidUser</code> receives a value, but for some reason, it just won't advance into the if statement. I need it to return null so I can return an Unauthorized() in my Account Controller, but it just seems to ignore it.</p>
  <p>Any help will be appreciated. Thank you.</p>