Function: buildEndSessionUrl()
August 29, 2025 ยท View on GitHub
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.
Note
URL of the authorization server's end session endpoint
must be configured.
Parameters
| Parameter | Type | Description |
|---|---|---|
config | Configuration | - |
parameters? | Record<string, string> | URLSearchParams | Logout endpoint parameters |
Returns
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