openiddict / openiddict-samples

.NET samples for OpenIddict

Home Page:https://documentation.openiddict.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zirku example: Logging out with the client gives an HTTP 500 error

Devwulf opened this issue · comments

The error on the server-side that it gives specifically is:

System.InvalidOperationException: The logout request was not handled.

It seems adding this line in Startup.cs of the server, when enabling endpoint passthroughs, fixes the issue:

options.UseAspNetCore()
    ...
    .EnableLogoutEndpointPassthrough()
    ...;

Quick question, is it better to logout using the /Account/LogOff endpoint or the /connect/logout endpoint?

Thanks. Fixed as part of 9feb9db.

Quick question, is it better to logout using the /Account/LogOff endpoint or the /connect/logout endpoint?

If you want to redirect your users back to the client, a logout endpoint managed by OpenIddict is what you need.