I am working with the new ASP.NET Identity (RTM) and I was wondering how would I go on about changing registering and login from being a UserName to an Email.
The id
If you really want to use e-mail address to log in, then, IMHO, the "hack" you suggested is the best approach. Because, if you insist on "doing it properly" you'll have to at least
On the other hand, if you decide to "hack" the UserName field you need to
make sure UserManager.UserValidator instance used in your AccountController allows special characters used in e-mail addresses. To do this, make sure its nondefault constructor looks like this:
public AccountController(UserManager userManager)
{
UserManager = userManager;
var userValidator = UserManager.UserValidator as UserValidator;
userValidator.AllowOnlyAlphanumericUserNames = false;
}
I hope this could help you weigh the pros and cons of both approaches and come up with the best solution. Good luck!