Closed ntheile closed 8 years ago
Hi, I had the same issue. I modified LogoutRedirectAsync() in KeycloakAuthenticationHandler file with this:
Response.Redirect( (await KeycloakIdentity.GenerateLogoutUriAsync(Options, Request.Uri, new Uri(Options.PostLogoutRedirectUrl))) .ToString());
instead of properties.RedirectUri
Fixed in version 2.1.5 using the proposed fix detailed above.
thx @dylanplecki and @greibach !!!!
When trying to log out via Request.GetOwinContext().Authentication.SignOut(), I get the following error:
Value cannot be null. Parameter name: uriString [ArgumentNullException: Value cannot be null. Parameter name: uriString] System.Uri..ctor(String uriString) +6766781 Owin.Security.Keycloak.Middleware.d10.MoveNext() +120
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
Owin.Security.Keycloak.Middleware.d 2.MoveNext() +243
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
...
A quick workaround is to delete the aspnet cookie and hit the OIDC logout url: