Function: buildEndSessionUrl()

August 29, 2025 ยท View on GitHub

๐Ÿ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


โ–ธ buildEndSessionUrl(config, parameters?): URL

Returns a URL to redirect the user-agent to after they log out to trigger RP-Initiated Logout at the Authorization Server.

Parameters

ParameterTypeDescription
configConfiguration-
parameters?Record<string, string> | URLSearchParamsLogout endpoint parameters

Returns

URL

URL Instance with URL.searchParams including client_id and all parameters from the parameters argument

Example

let config!: client.Configuration
let post_logout_redirect_uri!: string
let id_token!: string

let redirectTo = client.buildEndSessionUrl(config, {
  post_logout_redirect_uri,
  id_token_hint: id_token,
})
// redirect now