[Vuejs]-Asp.net core 3.1 backend does not get the Identity from cookie

0👍

Maybe you are missing AddRoles<IdentityRoles>()?

services.AddIdentity<AppUser, IdentityRole>(
    opts =>
    {
        opts.SignIn.RequireConfirmedEmail = true;
    }
)
.AddRoles<IdentityRoles>() .// <== this line
.AddSignInManager<SignInManager<AppUser>>()
.AddEntityFrameworkStores<MyDBContext>()
.AddDefaultTokenProviders();

Leave a comment