IdentityManager.AspNetIdentity icon indicating copy to clipboard operation
IdentityManager.AspNetIdentity copied to clipboard

AspNetIdentityManagerService : CreateUserAsync : UserManager.CreateUserAsync : RequireUniqueEmail error

Open BruceHunter opened this issue 8 years ago • 1 comments

If you set the following configuration for the AspNetIdentity UserManager.

            manager.UserValidator = new UserValidator<User, string>(manager)
            {
                AllowOnlyAlphanumericUserNames = false,
                RequireUniqueEmail = true
            };

If you call the method _identityManagerService.CreateUserAsync().

with RequireUniqueEmail = true

You will get an 401 Result Error about Email can not be null or empty message.

The workaround is to set RequireUniqueEmail = false.

BruceHunter avatar Mar 21 '16 21:03 BruceHunter