Skip to content

IdentityOptions.User.RequireUniqueEmail setting seems to be ignored. #31

@braveyp

Description

@braveyp

My initialisation code for Identity is something along the lines of:

var builder = services.AddIdentityCore<ApplicationUser>(options =>
{
    options.Stores.MaxLengthForKeys = 128;
    options.SignIn.RequireConfirmedAccount = true;
    options.User.RequireUniqueEmail = false;
    configureOptions?.Invoke(options);
});

When I try and create a user with a duplicate email address (but different username) I get an error that the email address is already taken. I did note that the mysql schema at least has a unique constraint on the email column which is the first issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions