From ef991774b73cde617f544d729ca938c891c9d38b Mon Sep 17 00:00:00 2001 From: MarcEricMartel <74071476+MarcEricMartel@users.noreply.github.com> Date: Tue, 1 Nov 2022 11:47:41 -0700 Subject: [PATCH] LOL Retour des codes d'erreur --- GrossesMitaines/GrossesMitainesAPI/Program.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/GrossesMitaines/GrossesMitainesAPI/Program.cs b/GrossesMitaines/GrossesMitainesAPI/Program.cs index 347b7fd..67644cf 100644 --- a/GrossesMitaines/GrossesMitainesAPI/Program.cs +++ b/GrossesMitaines/GrossesMitainesAPI/Program.cs @@ -24,6 +24,13 @@ builder.Services.AddCors(options => { builder.Services.AddControllers(); +builder.Services.AddIdentityCore() + .AddRoles() + .AddEntityFrameworkStores() + .AddSignInManager(); +builder.Services.AddAuthorization(); +builder.Services.AddAuthentication().AddIdentityCookies(); + // Source: https://github.com/dotnet/aspnetcore/issues/9039 builder.Services.ConfigureApplicationCookie(o => { o.Events = new CookieAuthenticationEvents() { @@ -48,13 +55,6 @@ builder.Services.ConfigureApplicationCookie(o => { }; }); -builder.Services.AddIdentityCore() - .AddRoles() - .AddEntityFrameworkStores() - .AddSignInManager(); -builder.Services.AddAuthorization(); -builder.Services.AddAuthentication().AddIdentityCookies(); - // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer();