title: ASP.NET Identity 2 Separation of Email and UserName and using Email to login
body: <p>By default, ASP.NET Identity has the UserName and Email fields as being the email the user inputs. I've already changed it so that my system takes in a separate username and email for the user. </p>
  
  <p>My problem is that now I cannot login to the system because of the checks Identity does against both the UserName and Email. </p>
  
  <p>I was wondering if there was a way to keep these two fields separate and unique, while being able to just check against the Email field in order to login to the system? </p>
  
  <p>I noticed that <code>public virtual Task&lt;SignInStatus&gt; PasswordSignInAsync(string userName, string password, bool isPersistent, bool shouldLockout);</code> checks the userName, but changing this to the email does nothing and I am still unable to login. </p>
  
  <p>I've also looked at these other questions: </p>
  
  <p><a href="https://stackoverflow.com/questions/19481835/asp-net-username-to-email">ASP.Net UserName to Email</a></p>
  
  <p><a href="https://stackoverflow.com/questions/25611957/allowing-both-email-and-username-for-authentication">Allowing both email and username for authentication</a></p>
  
  <p>for possible solutions and found nothing really allowed me to do what I want. </p>
  
  <p>Is there anything else I could possibly attempt in order to have separate usernames and emails, while still being able to login with the email field?</p>