mirror of
https://github.com/hanzoai/openid-client.git
synced 2026-09-24 17:01:10 +00:00
1.7 KiB
1.7 KiB
Function: buildEndSessionUrl()
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