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 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 => OnRedirectToIdentityProvider = context =>
{ {
if (!string.IsNullOrWhiteSpace(publicOrigin)) if (!string.IsNullOrWhiteSpace(publicOrigin))

View File

@@ -6,6 +6,7 @@
"ClientSecret": "" "ClientSecret": ""
}, },
"Keycloak": { "Keycloak": {
"Authority": "https://10.4.0.131/keycloak/realms/webzine-realm",
"PublicOrigin": "http://192.168.10.80:8080" "PublicOrigin": "http://192.168.10.80:8080"
} }
} }