You have to modify SignInHelper.PasswordSignIn
method. By default it uses FindByNameAsync
to check if user with given name exists:
public async Task<SignInStatus> PasswordSignIn(string userName, string password, bool isPersistent, bool shouldLockout)
{
var user = await UserManager.FindByNameAsync(userName);
// (...)
change it to use FindByEmailAsync
:
var user = await UserManager.FindByEmailAsync(userName);
You can find SignInHelper
class in *AppCode\IdentityConfig.cs` file.