Answer the question
In order to leave comments, you need to log in
How to connect Identity for two entities at once in two contexts?
There is a code for connecting Identity:
services.AddIdentity<Customer, IdentityRole<Guid>>(o =>
{
o.Password.RequireNonAlphanumeric = false;
o.Password.RequireUppercase = false;
o.Password.RequireLowercase = false;
})
.AddEntityFrameworkStores<StoreContext>()
.AddDefaultTokenProviders();
services.AddIdentity<Manager, IdentityRole<Guid>>()
.AddEntityFrameworkStores<ManagerContext>()
.AddDefaultTokenProviders();
InvalidOperationException: Scheme already exists: Identity.Application Microsoft.AspNetCore.Authentication.AuthenticationOptions.AddScheme(string name, Action<AuthenticationSchemeBuilder> configureBuilder)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question