Skip to content

TypeScript API / @laikacms/server/oauth2 / handleLogout

Function: handleLogout() ​

ts
function handleLogout(request, config): Promise<Response>;

Handle logout from a single session (GET or POST /oauth2/logout)

Requires a valid access token. Prefer the Authorization: Bearer … header; the legacy ?access_token= query string is still honored for backward compatibility but a warning is logged.

Parameters ​

ParameterTypeDescription
requestRequestThe incoming request
configOAuthConfigOAuth configuration

Returns ​

Promise<Response>

HTML response showing logout success

Released under the MIT License.