<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with session]]></title><description><![CDATA[A list of topics that have been tagged with session]]></description><link>https://fusionauth.io/community/forum/tags/session</link><generator>RSS for Node</generator><lastBuildDate>Wed, 28 Oct 2026 14:08:28 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/tags/session.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[How to properly revoke refresh tokens when logging out via OAuth in FusionAuth?]]></title><description><![CDATA[<p dir="auto">The /oauth2/logout endpoint only removes the <strong>SSO session</strong> (the front-channel session controlled by the "Keep Me Signed In" toggle). It does <strong>not</strong> automatically revoke the <strong>refresh token</strong> (also known as offline_access).</p>
<p dir="auto">To properly implement logout, you need to handle both sessions separately:</p>
Recommended Logout Flow

<strong>User initiates logout</strong> in your application
<strong>Your backend revokes the refresh token</strong> using the <a href="https://fusionauth.io/docs/apis/jwt/revoke-refresh-tokens" rel="nofollow ugc">Revoke Refresh Tokens API</a>:DELETE /api/jwt/refresh/{refreshTokenId}

Or revoke by user and application:DELETE /api/jwt/refresh?userId={userId}&amp;applicationId={applicationId}


<strong>Destroy your local application session</strong> (clear tokens, cookies, etc.)
<strong>Redirect to /oauth2/logout</strong> with id_token_hint to clear the SSO session

Why This Approach?
<p dir="auto">Revoking the refresh token from your application (step 2) is better than relying on the logout URL callback because:</p>

You have direct access to the user's session data
You know exactly which refresh token to revoke
You can handle errors gracefully
The flow is more deterministic

<p dir="auto">The /oauth2/logout endpoint can call a logout URL configured in your FusionAuth OAuth application settings, but handling revocation proactively in your app provides better control.</p>
Important Note About JWTs
<p dir="auto">Since JWTs (access tokens) are stateless, they cannot be immediately revoked by FusionAuth. If you need to invalidate JWTs before their natural expiration, you'll need to implement your own revocation strategy, such as maintaining a token denylist in your application.</p>
Related Documentation

<a href="https://fusionauth.io/docs/apis/oauth/logout" rel="nofollow ugc">OAuth Logout API</a> - Details on the /oauth2/logout endpoint
<a href="https://fusionauth.io/docs/apis/jwt/revoke-refresh-tokens" rel="nofollow ugc">Revoke Refresh Tokens API</a> - How to revoke refresh tokens programmatically
<a href="https://fusionauth.io/docs/lifecycle/authenticate-users/logout-session-management" rel="nofollow ugc">Logout and Session Management</a> - Comprehensive guide on logout strategies and session types
<a href="https://fusionauth.io/articles/tokens/revoking-jwts" rel="nofollow ugc">Revoking JWTs</a> - Strategies for JWT revocation
<a href="https://fusionauth.io/docs/extend/events-and-webhooks/events/jwt/jwt-refresh-token-revoke" rel="nofollow ugc">JWT Refresh Token Revoke Event</a> - Webhook event when refresh tokens are revoked

]]></description><link>https://fusionauth.io/community/forum/topic/3192/how-to-properly-revoke-refresh-tokens-when-logging-out-via-oauth-in-fusionauth</link><guid isPermaLink="true">https://fusionauth.io/community/forum/topic/3192/how-to-properly-revoke-refresh-tokens-when-logging-out-via-oauth-in-fusionauth</guid><dc:creator><![CDATA[FASupportBot]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Why does the FusionAuth SSO cookie have a 68-year Max-Age?]]></title><description><![CDATA[<p dir="auto">The fusionauth.sso cookie is intentionally designed as a <strong>persistent cookie</strong>, which is why it has such a long Max-Age value (2147483647 seconds, approximately 68 years). The value 2147483647 is the maximum 32-bit signed integer, essentially making the cookie persistent from the browser's perspective.</p>
<p dir="auto">However, this does not mean the cookie remains valid for 68 years. The actual validity and usability of the SSO session are controlled <strong>server-side by FusionAuth</strong>, not by the cookie's Max-Age attribute. Specifically:</p>

The SSO session duration is configured in your <strong>Tenant settings</strong> under the <strong>OAuth tab</strong> as the <strong>Session timeout</strong> value (in seconds)
FusionAuth validates whether the cookie can still be used based on these server-side SSO settings
Even though the cookie persists in the browser for a long time, FusionAuth will reject it once the configured SSO session timeout has elapsed

<p dir="auto">The long Max-Age ensures the cookie isn't prematurely deleted by the browser, but the <strong>effective session lifetime is determined by your tenant's SSO configuration</strong>, not the cookie attribute itself.</p>
<p dir="auto">The FusionAuth SSO session allows transparent authentication on one browser or device until one of the following happens:</p>

The SSO session expires (based on the tenant's configured Session timeout)
The user is logged out via the Front-Channel logout endpoint
The refresh token representing the FusionAuth SSO session is revoked via an API call or the admin UI

<p dir="auto"><strong>To address penetration test findings:</strong></p>

<strong>Review and configure appropriate SSO session timeouts</strong> in your Tenant's OAuth settings (Tenants → Your Tenant → OAuth → Session timeout)
<strong>Explain to your security auditors</strong> that the server-side session validation controls the actual security boundary, not the cookie's Max-Age. The cookie's max-age is a technical implementation detail that allows FusionAuth to manage session lifecycles server-side
<strong>Demonstrate that the actual session lifetime</strong> is enforced by the configured Session timeout value, not the 68-year cookie expiration

<p dir="auto">This is a standard pattern for SSO implementations where server-side session management provides the security control rather than relying solely on cookie expiration. The browser retains the cookie, but FusionAuth enforces when that cookie is actually valid and usable for authentication.</p>
Related Documentation

<a href="https://fusionauth.io/docs/lifecycle/authenticate-users/logout-session-management#fusionauth-sso" rel="nofollow ugc">Logout and Session Management - FusionAuth SSO</a> - Comprehensive guide to how FusionAuth SSO sessions work
<a href="https://fusionauth.io/docs/lifecycle/authenticate-users/logout-session-management#session-timeouts-and-lifetime" rel="nofollow ugc">Session Timeouts and Lifetime</a> - Details on configuring and understanding SSO session timeouts at the tenant level
<a href="https://fusionauth.io/docs/lifecycle/authenticate-users/logout-session-management#types-of-session-management" rel="nofollow ugc">Types of Session Management</a> - Overview of different session types in FusionAuth
<a href="https://fusionauth.io/docs/reference/cookies#cookie-list" rel="nofollow ugc">Login Page Cookies Reference</a> - Documentation of all cookies set by FusionAuth hosted login pages

]]></description><link>https://fusionauth.io/community/forum/topic/3163/why-does-the-fusionauth-sso-cookie-have-a-68-year-max-age</link><guid isPermaLink="true">https://fusionauth.io/community/forum/topic/3163/why-does-the-fusionauth-sso-cookie-have-a-68-year-max-age</guid><dc:creator><![CDATA[FASupportBot]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[How to revoke all active user sessions and access tokens quickly?]]></title><description><![CDATA[<p dir="auto">To revoke all active user sessions and access tokens immediately during a security incident, you need to take a two-pronged approach: revoking sessions (refresh tokens) and invalidating access tokens.</p>
1. Revoke All Sessions (Refresh Tokens)
<p dir="auto">Sessions in FusionAuth are represented by refresh tokens, and these can be directly revoked using the API:</p>
<p dir="auto"><strong>Revoke all refresh tokens for all users in an application:</strong></p>
DELETE /api/jwt/refresh?applicationId={applicationId}

<p dir="auto"><strong>Revoke all refresh tokens for a specific user:</strong></p>
DELETE /api/jwt/refresh?userId={userId}

<p dir="auto"><strong>Revoke all refresh tokens for a specific user in a specific application:</strong></p>
DELETE /api/jwt/refresh?applicationId={applicationId}&amp;userId={userId}

<p dir="auto">These API calls require an API key with appropriate permissions. When refresh tokens are revoked, users will be unable to obtain new access tokens and will need to re-authenticate.</p>
2. Invalidate Access Tokens via Key Rotation
<p dir="auto">To invalidate access tokens (not just refresh tokens), you need to rotate the JWT signing keys:</p>
<p dir="auto"><strong>In FusionAuth</strong>: Rotate the JWT signing keys used by your tenant/application. This will cause all subsequently validated tokens signed with the old key to fail validation.</p>
<p dir="auto"><strong>In your application server</strong>: Update your application to use the new signing key for validating incoming JWTs. This ensures that tokens signed with the old key are no longer trusted.</p>
<p dir="auto">This approach effectively invalidates all active access tokens because they were signed with the now-rotated key. When your application validates these tokens using the new key, validation will fail and users will need to re-authenticate.</p>
Important Considerations

<strong>Access tokens are stateless JWTs by design</strong>, so they cannot be revoked individually from FusionAuth's side once issued. This is why key rotation is the standard mechanism to invalidate all tokens at once.
<strong>Key rotation is immediate and forceful</strong>: All existing access tokens become invalid immediately upon rotation, making this the appropriate response for security incidents.
<strong>Ensure your application is updated</strong> to accept the new signing key before or immediately after rotation to prevent service disruption for legitimate re-authentication attempts.
<strong>Short access token lifetimes</strong> (minutes, not hours) are strongly recommended as a defense-in-depth measure, since access tokens cannot be individually revoked.
<strong>Use webhooks</strong> to notify your resource servers when refresh tokens are revoked, allowing them to maintain a blocklist of affected users if additional control is needed before access tokens naturally expire.

Alternative: Maintain a Revocation List
<p dir="auto">For access tokens still within their validity period after key rotation, you can implement an application-level revocation mechanism:</p>

Subscribe to the JWT Refresh Token Revoke webhook event
When refresh tokens are revoked, record the affected users/tokens
On each request, check if the user's token has been revoked before processing

<p dir="auto">This provides additional granular control but requires application-level implementation.</p>
Related Documentation

<a href="https://fusionauth.io/docs/apis/jwt/revoke-refresh-tokens" rel="nofollow ugc">Revoke Refresh Tokens API</a> - API for revoking refresh tokens by user, application, or token ID
<a href="https://fusionauth.io/docs/operate/secure/key-rotation" rel="nofollow ugc">Key Rotation</a> - Complete guide to rotating keys in FusionAuth, including JWT signing keys
<a href="https://fusionauth.io/docs/extend/events-and-webhooks/events/jwt/jwt-refresh-token-revoke" rel="nofollow ugc">JWT Refresh Token Revoke Event</a> - Webhook event triggered when refresh tokens are revoked
<a href="https://fusionauth.io/docs/lifecycle/authenticate-users/logout-session-management" rel="nofollow ugc">Logout and Session Management</a> - Overview of session management approaches in FusionAuth
<a href="https://fusionauth.io/community/forum/topic/2207/can-i-revoke-an-access-token-in-fusionauth">Can I Revoke an Access Token?</a> - Community discussion on access token revocation limitations
<a href="https://fusionauth.io/docs/lifecycle/authenticate-users/login-api/json-web-tokens#configuring-jwt-signing" rel="nofollow ugc">Configuring JWT Signing</a> - How to configure JWT signing keys at the tenant and application level

]]></description><link>https://fusionauth.io/community/forum/topic/3161/how-to-revoke-all-active-user-sessions-and-access-tokens-quickly</link><guid isPermaLink="true">https://fusionauth.io/community/forum/topic/3161/how-to-revoke-all-active-user-sessions-and-access-tokens-quickly</guid><dc:creator><![CDATA[FASupportBot]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>