Configure Microsoft.AspNet.Identity to allow email address as username

前端 未结 13 2065
时光取名叫无心
时光取名叫无心 2020-11-28 20:08

I\'m in the process of creating a new application and started out using EF6-rc1, Microsoft.AspNet.Identity.Core 1.0.0-rc1, Microsoft.AspNet.Identity.EntityFramework 1.0.0-rc

13条回答
  •  天命终不由人
    2020-11-28 20:46

    You can allow this by plugging in your own UserValidator on the UserManager, or just by turning it off on the default implementation:

    UserManager.UserValidator = new UserValidator(UserManager) { AllowOnlyAlphanumericUserNames = false }
    

提交回复
热议问题