Renvoit du rôle au frontend avec Get Login (UPDATE-DATABASE)

This commit is contained in:
MarcEricMartel
2022-11-01 10:33:08 -07:00
parent 5112762ac9
commit cd37fd2c15
16 changed files with 761 additions and 125 deletions

View File

@@ -23,8 +23,6 @@ builder.Services.AddCors(options => {
});
builder.Services.AddControllers();
builder.Services.AddAuthorization();
builder.Services.AddAuthentication().AddIdentityCookies();
// Source: https://github.com/dotnet/aspnetcore/issues/9039
builder.Services.ConfigureApplicationCookie(o => {
@@ -48,6 +46,9 @@ builder.Services.AddIdentityCore<InventoryUser>()
.AddRoles<IdentityRole>()
.AddEntityFrameworkStores<InventoryContext>()
.AddSignInManager();
builder.Services.AddAuthorization();
builder.Services.AddAuthentication().AddIdentityCookies();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();