Skip to main content

Function: logout()

function logout(cluster: string, skipRedirect?: boolean): Promise<void>;

Defined in: lib/auth.ts:148

Logs out the user by clearing the authentication token for the specified cluster. For OIDC clusters, redirects to the IdP logout endpoint to properly end the session.

Parameters​

ParameterTypeDefault valueDescription
clusterstringundefinedThe name of the cluster to log out from.
skipRedirectbooleanfalseIf true, skip the OIDC logout redirect (caller handles navigation).

Returns​

Promise<void>

Throws​

When logout request fails