implementing-fsa-logout

Creates logout endpoints that clear cookies and redirect to Scalekit's /oidc/logout for session invalidation.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/scalekit-inc/github-copilot-authstack --skill implementing-fsa-logout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-fsa-logout
Source: https://github.com/scalekit-inc/github-copilot-authstack/tree/main/plugins/full-stack-auth/skills/implement-logout
Command: npx skills add https://github.com/scalekit-inc/github-copilot-authstack --skill implementing-fsa-logout

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Web applications that rely on Scalekit OIDC SSO often fail to securely terminate sessions, leaving lingering cookies or relying on provider sessions. This Skill provides a robust logout flow that clears the application's session cookies and redirects the user to Scalekit's /oidc/logout endpoint to invalidate the Scalekit session.

Core Features & Use Cases

  • Unified logout endpoint: Exposes a GET /logout route to terminate local session data and trigger Scalekit's logout.
  • Secure token handling: Reads idToken before clearing cookies to supply id_token_hint to Scalekit's logout.
  • Redirect-based invalidation: Uses a browser redirect to Scalekit's /oidc/logout to ensure the Scalekit session is ended.
  • Post-logout redirect control: Requires post_logout_redirect_uri to be allowlisted in the Scalekit dashboard and navigates users back to a safe URL.
  • Cross-stack templates: Includes implementation templates for Node.js/Express, Python/Flask, Go/Gin, and Java/Spring Boot.

Quick Start

Add a GET /logout route that reads the idToken before clearing cookies, builds the Scalekit logout URL, clears session cookies, and redirects the browser to the Scalekit logout URL.

Frequently Asked Questions about implementing-fsa-logout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a secure OIDC logout flow for my web app?

A secure OIDC logout flow clears local session cookies and redirects the browser to the provider's logout endpoint to invalidate the server session. This prevents lingering cookies and ensures the authenticated session is fully terminated.

How do I clear session cookies and redirect to Scalekit /oidc/logout?

You clear session cookies by exposing a GET /logout route that reads the idToken, builds the Scalekit /oidc/logout URL with an id_token_hint, clears local cookies, and redirects the browser to invalidate the Scalekit session.

Does this logout approach work with Python Flask and Node.js Express?

Yes, this cross-stack logout approach works with Python Flask, Node.js Express, Go Gin, and Java Spring Boot. It provides implementation templates for cookie-based session management and post-logout redirects across these frameworks.

Why do I need an allowlisted post-logout redirect URI for OIDC?

An allowlisted post_logout_redirect_uri is required to navigate users back to a safe URL after logout. You must configure this redirect URI in the Scalekit dashboard to ensure the post-logout destination is trusted and secure.

Why is my web app logout not ending the Scalekit provider session?

Your web app logout is not ending the provider session because it only clears local cookies without browser delegation. You must redirect to Scalekit's /oidc/logout endpoint to ensure the Scalekit session is properly invalidated.

Do I need the idToken to generate a valid /oidc/logout URL?

Yes, you need the idToken to generate a valid /oidc/logout URL. The logout route reads the idToken before clearing cookies to supply the id_token_hint parameter, which securely links the logout request to the active session.