features.rpInitiatedLogout
Specifies whether RP-Initiated Logout capabilities shall be enabled. When enabled, the authorization server shall support logout requests initiated by relying parties, allowing clients to request termination of end-user sessions.
default value:
{ enabled: true, logoutSource: [AsyncFunction: logoutSource], // see expanded details below postLogoutSuccessSource: [AsyncFunction: postLogoutSuccessSource] // see expanded details below}(Click to expand) features.rpInitiatedLogout options details
logoutSource
Section titled “logoutSource”Specifies the HTML source that shall be rendered when RP-Initiated Logout displays a confirmation prompt to the User-Agent. This template shall be presented to request explicit end-user confirmation before proceeding with the logout operation, ensuring user awareness and consent for session termination.
default value:
async function logoutSource(ctx, form) { // @param ctx - koa request context // @param form - form source (id="op.logoutForm") to be embedded in the page and submitted by // the End-User ctx.body = `<!DOCTYPE html> <html> <head> <title>Logout Request</title> <style>/* css and html classes omitted for brevity, see lib/helpers/defaults.js */</style> </head> <body> <div> <h1>Do you want to sign-out from ${ctx.host}?</h1> ${form} <button autofocus type="submit" form="op.logoutForm" value="yes" name="logout">Yes, sign me out</button> <button type="submit" form="op.logoutForm">No, stay signed in</button> </div> </body> </html>`;}postLogoutSuccessSource
Section titled “postLogoutSuccessSource”Specifies the HTML source that shall be rendered when an RP-Initiated Logout request concludes successfully but no post_logout_redirect_uri was provided by the requesting client. This template shall be presented to inform the end-user that the logout operation has completed successfully and provide appropriate post-logout guidance.
default value:
async function postLogoutSuccessSource(ctx) { // @param ctx - koa request context const display = ctx.oidc.client?.clientName || ctx.oidc.client?.clientId; ctx.body = `<!DOCTYPE html> <html> <head> <title>Sign-out Success</title> <style>/* css and html classes omitted for brevity, see lib/helpers/defaults.js */</style> </head> <body> <div> <h1>Sign-out Success</h1> <p>Your sign-out ${display ? `with ${display}` : ''} was successful.</p> </div> </body> </html>`;}