This commit is contained in:
Loic Masi
2026-04-21 12:59:19 +02:00
parent 74ff359049
commit 7056a30e60
2 changed files with 9 additions and 0 deletions

View File

@@ -181,6 +181,14 @@ try
options.Events = new OpenIdConnectEvents
{
OnAuthenticationFailed = context =>
{
logger.Error(context.Exception, "Erreur d'authentification OIDC : {Message}", context.Exception.Message);
context.HandleResponse();
context.Response.Redirect("/account/auth-error?message=" + Uri.EscapeDataString(context.Exception.Message));
return Task.CompletedTask;
},
OnRedirectToIdentityProvider = context =>
{
if (!string.IsNullOrWhiteSpace(publicOrigin))