Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.65 KB

buildEndSessionUrl.md

File metadata and controls

45 lines (31 loc) · 1.65 KB

Function: buildEndSessionUrl()

💗 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.

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

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