logout

fun logout(path: String = "/oidc/", onLogout: suspend RoutingContext.() -> Unit = {})(source)

Configures the plugin-managed logout route.

Requires sessions. When omitted, defaults to POST /oidc/{providerName}/logout with an empty onLogout hook and without sending post_logout_redirect_uri to the OpenID Provider.

The onLogout hook runs after the local session is cleared and before the logout redirect.

Report a problem

Parameters

path

log out route path. Query parameters are not supported.

onLogout

hook invoked after the session is cleared.


fun logout(path: String = "/oidc/", postLogoutRedirectUri: URLBuilder.() -> Unit, onLogout: suspend RoutingContext.() -> Unit = {})(source)

Configures the plugin-managed logout route and includes post_logout_redirect_uri in RP-initiated logout.

Requires sessions. The postLogoutRedirectUri builder must not include query parameters and should be registered with the OpenID Provider when end-session is used.

The onLogout hook runs after the local session is cleared and before the logout redirect.

Report a problem

Parameters

path

log out route path. Query parameters are not supported.

postLogoutRedirectUri

local redirect URI sent as post_logout_redirect_uri and used as fallback when end-session URL cannot be built.

onLogout

hook invoked after the session is cleared.