Generated code has a runtime error when both Username and Password are left blank. Can add a simple null test as follows, and blanks will fall through to "Invalid user or password":
if (user != null)
{
if (!user.EmailConfirmed)
{
return Redirect("~/Login?error=User email not confirmed");
}
var result = await signInManager.PasswordSignInAsync(userName, password, false, false);
if (result.Succeeded)
{
return Redirect("~/");
}
}
return Redirect("~/Login?error=Invalid user or password");
However, with this code added, I still do not see the error text appear?