I had problems too trying to use a custom SignInManager
and turns out to be really easy after all to implement.
In Startup.cs
, after the default implementation of services.Identity
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
You only need to inject into the built-in DI the following:
services.AddScoped<SignInManager<MyApplicationUser>, MySignInManager>();
The default SignInManager
is overwrited by the custom one.