LOL Retour des codes d'erreur
This commit is contained in:
parent
8819cf3b71
commit
ef991774b7
@ -24,6 +24,13 @@ builder.Services.AddCors(options => {
|
|||||||
|
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
|
|
||||||
|
builder.Services.AddIdentityCore<InventoryUser>()
|
||||||
|
.AddRoles<IdentityRole>()
|
||||||
|
.AddEntityFrameworkStores<InventoryContext>()
|
||||||
|
.AddSignInManager();
|
||||||
|
builder.Services.AddAuthorization();
|
||||||
|
builder.Services.AddAuthentication().AddIdentityCookies();
|
||||||
|
|
||||||
// Source: https://github.com/dotnet/aspnetcore/issues/9039
|
// Source: https://github.com/dotnet/aspnetcore/issues/9039
|
||||||
builder.Services.ConfigureApplicationCookie(o => {
|
builder.Services.ConfigureApplicationCookie(o => {
|
||||||
o.Events = new CookieAuthenticationEvents() {
|
o.Events = new CookieAuthenticationEvents() {
|
||||||
@ -48,13 +55,6 @@ builder.Services.ConfigureApplicationCookie(o => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
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
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user