Last active
February 28, 2016 12:01
-
-
Save pollax/4449ce7cf47bde6b3a95 to your computer and use it in GitHub Desktop.
Allow + and other non alphanumeric characters in UserName using ASP.NET Core 1.0, Identity 3.0 and Entity Framework Core 1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
// (Rest of code removed) | |
// Note the + added to the string of allowed user name characters | |
services.AddIdentity<ApplicationUser, IdentityRole>(o => o.User.AllowedUserNameCharacters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -._@+") | |
.AddEntityFrameworkStores<ApplicationDbContext>() | |
.AddDefaultTokenProviders(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment