Skip to content

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.

OidcDiscovery

The OIDC discovery document.

string

Optional ID token to pass as id_token_hint so the OP can identify the session.

string

Optional URI to redirect the user to after logout completes.

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