Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Can I use for User authorization only email, no UserName? #1390


User avatar
0
vitaly created

Can I use for User authorization only email, no UserName?


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Username is mandatory. But you can use email as username as a workaround.

  • User Avatar
    0
    mikek created

    FWIW I found that I also needed to add a custom validator in my UserManager ctor to be able to use non-alphanumeric characters in the username:

    this.UserValidator = new UserValidator<User,long>(this) { RequireUniqueEmail = false, AllowOnlyAlphanumericUserNames = false };