buildLogoutUrl
buildLogoutUrl(
discovery,idToken?,postLogoutRedirectUri?):string|null
Defined in: packages/core/src/logout.ts:15
Builds an RP-Initiated Logout URL for ending the user’s session at the OpenID Provider.
Returns null if the discovery document has no end_session_endpoint.
Parameters
Section titled “Parameters”discovery
Section titled “discovery”The OIDC discovery document.
idToken?
Section titled “idToken?”string
Optional ID token to pass as id_token_hint so the OP can identify the session.
postLogoutRedirectUri?
Section titled “postLogoutRedirectUri?”string
Optional URI to redirect the user to after logout completes.
Returns
Section titled “Returns”string | null
The fully constructed logout URL, or null if the endpoint is not available.
OpenID Connect RP-Initiated Logout 1.0 §2 — Logout Request