I add UseAuthentication()
; to my startup.cs
The Allow cors fail and the cors is not allowed, there's any order to setup please? (without app.UseAuthentication() no cors problem)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseHttpsRedirection();
app.UseRouting();
app.UseCors(
options => options.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
); app.UseHttpStatusCodeExceptionMiddleware();
app.UseAuthentication();
on ConfigureServices i have :
void ConfigureServices(IServiceCollection services)
{....
services.AddCors();
services.AddSSOAuthentication(Configuration, CurrentEnvironment);
services.AddControllers();
services.AddRequestLogging(opt =>
{
opt.ResponseTimeInMs = true;
opt.CookiesLoggingEnabled = false;
});
services.AddSwaggerGen();
}