# Session and Token Lifetime Settings

Reference for every FusionAuth setting that controls session, token, and logout behavior.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

FusionAuth applies lifetime changes to existing sessions and tokens at the next check, not only to new ones. For how to choose values, see [Configure Session Lifetimes](https://fusionauth.io/docs/authentication/sessions/configure-session-lifetimes.md).

## SSO Session

| Setting | Location | API field | Unit | Default | Behavior |
| --- | --- | --- | --- | --- | --- |
| **Session timeout** | Tenants -> OAuth | **`tenant.httpSessionMaxInactiveInterval`** | Seconds | `3600` | Idle timeout. Each SSO login to an Application resets the timeout. No absolute maximum. No Application override. |
| **Keep me signed in** | Login form | **`rememberDevice`** form field | Boolean | Unchecked | FusionAuth creates the SSO session only when the value is `true`. |
| **Allow access token bootstrap to create SSO session** | Tenants -> OAuth | **`tenant.ssoConfiguration.allowAccessTokenBootstrap`** | Boolean | `false` | Lets an authorize request with an access token create an SSO session. For more information, see [Create an SSO Session From an Access Token](https://fusionauth.io/docs/authentication/sessions/enable-sso.md#create-an-sso-session-from-an-access-token). |

## Refresh Tokens

Refresh tokens bound [centralized sessions](https://fusionauth.io/docs/authentication/sessions/centralized-sessions.md) and decide how long a client can get new access tokens. Set the values on the Tenant. To override the values for one Application, turn on **Enable application-level JWT override** on the Application's JWT tab. Application values never apply to the SSO session.

| Setting | Location | API field | Unit | Default | Behavior |
| --- | --- | --- | --- | --- | --- |
| **Duration** | JWT tab | **`jwtConfiguration.refreshTokenTimeToLiveInMinutes`** | Minutes | `43200` | Lifetime of the refresh token, measured as the policy describes. |
| **Expiration policy** | JWT tab | **`jwtConfiguration.refreshTokenExpirationPolicy`** | `Fixed`, `SlidingWindow`, or `SlidingWindowWithMaximumLifetime` | `Fixed` | `Fixed` counts from login. `SlidingWindow` counts from the last refresh grant. `SlidingWindowWithMaximumLifetime` counts from the last refresh grant, up to **Maximum lifetime** after login. |
| **Maximum lifetime** | JWT tab | **`jwtConfiguration.refreshTokenSlidingWindowConfiguration.maximumTimeToLiveInMinutes`** | Minutes | None | Absolute limit for `SlidingWindowWithMaximumLifetime`. Must be at least **Duration**. |
| **Refresh token usage** | JWT tab | **`jwtConfiguration.refreshTokenUsagePolicy`** | `Reusable` or `OneTimeUse` | `Reusable` | `OneTimeUse` issues a new refresh token value at each refresh grant. The refresh token Id stays the same. |
| **Refresh token revocation** | Tenants -> JWT | **`tenant.jwtConfiguration.refreshTokenRevocationPolicy`** | Booleans | On password change, on action preventing login | Revokes all of a user's refresh tokens on the selected events. Tenant only. For the events, see [Revoke Sessions Automatically](https://fusionauth.io/docs/authentication/sessions/revoke-sessions.md#revoke-sessions-automatically). |

A refresh grant counts as use for the sliding window. Retrieving a refresh token with the API doesn't. For every refresh token field, including the one-time use grace period, see [Refresh Token Settings](https://fusionauth.io/docs/concepts/types/tenants.md#refresh-token-settings).

## Access Tokens

| Setting | Location | API field | Unit | Default | Behavior |
| --- | --- | --- | --- | --- | --- |
| **JWT duration** | JWT tab of the Tenant or Application | **`jwtConfiguration.timeToLiveInSeconds`** | Seconds | `3600` | Lifetime of access tokens and Id tokens. Fixed from issue. Revoking a refresh token doesn't shorten the lifetime. |

## Logout

| Setting | Location | API field | Behavior |
| --- | --- | --- | --- |
| **Logout URL** | Applications -> OAuth | **`application.oauthConfiguration.logoutURL`** | FusionAuth loads the URL in an iframe during front-channel logout, and redirects to the URL after logout when the request has no `post_logout_redirect_uri`. |
| **Logout behavior** | Applications -> OAuth | **`application.oauthConfiguration.logoutBehavior`** | `AllApplications` (default) loads every **Logout URL** in the Tenant. `RedirectOnly` loads none. |
| **Logout URL** | Tenants -> OAuth | **`tenant.logoutURL`** | Fallback redirect for Applications without a **Logout URL**. |

## Request Parameters

| Parameter | Endpoint | Behavior |
| --- | --- | --- |
| `offline_access` scope | `/oauth2/authorize` | Requests a refresh token, which a centralized session needs. |
| `prompt=login` | `/oauth2/authorize` | Shows the login form even when the SSO session exists. |
| `prompt=none` | `/oauth2/authorize` | Never shows a form. Returns `login_required` when no SSO session exists. |
| `max_age` | `/oauth2/authorize` | Shows the login form when the last login is older than the value, in seconds. `0` always shows the form. |
| `post_logout_redirect_uri` | `/oauth2/logout` | Redirect after logout. Must match an **Authorized redirect URL** of the Application. |
| `id_token_hint` | `/oauth2/logout` | Identifies the Application and session in place of `client_id`. FusionAuth accepts an expired Id token. |

For every parameter, see the [Authorize endpoint](https://fusionauth.io/docs/apis/oauth/authorize.md) and the [Logout endpoint](https://fusionauth.io/docs/apis/oauth/logout.md).

## Related Trust Settings

The following settings let a user skip a login step on a known device. Neither setting creates or extends an SSO session.

| Setting | Location | API field | Unit | Default | Behavior |
| --- | --- | --- | --- | --- | --- |
| **Two-Factor Trust** | Tenants -> Advanced | **`tenant.externalIdentifierConfiguration.twoFactorTrustIdTimeToLiveInSeconds`** | Seconds | `2592000` | How long a user can skip MFA on a device after a successful challenge. |
| **Device trust duration** | Tenants -> Security | **`tenant.ssoConfiguration.deviceTrustTimeToLiveInSeconds`** | Seconds | `31536000` | How long FusionAuth trusts a device before the user must complete CAPTCHA again. |

Related

[Authentication Configure Session and Token Lifetimes Learn how to set how long users stay logged in to FusionAuth and to your applications. sessionssession timeoutsession lifetime](https://fusionauth.io/docs/authentication/sessions/configure-session-lifetimes.md)

[Authentication How Sessions Work in FusionAuth Learn about the sessions that keep a user logged in to FusionAuth and to your applications, and how the sessions relate. sessionssso sessionrefresh tokens](https://fusionauth.io/docs/authentication/sessions/how-sessions-work.md)

[Authentication Sessions, SSO, and Logout Learn about how FusionAuth keeps users logged in across applications, and how to configure session lifetimes, single sign-on, and logout. sessionssession timeoutrefresh tokens](https://fusionauth.io/docs/authentication/sessions.md)

[Authentication Troubleshoot Sessions and Logout Learn how to fix common problems with FusionAuth SSO, session lifetimes, and logout. sessionssession timeoutrefresh tokens](https://fusionauth.io/docs/authentication/sessions/troubleshooting.md)
---

## Other pages in Sessions

> For the full index of this section, see [Authentication](https://fusionauth.io/docs/llms-authentication.txt).

- [Manage Application Sessions in FusionAuth With Refresh Tokens](https://fusionauth.io/docs/authentication/sessions/centralized-sessions.md): Learn how to track and revoke application sessions in FusionAuth by tying each session to a refresh token.
- [Configure Session and Token Lifetimes](https://fusionauth.io/docs/authentication/sessions/configure-session-lifetimes.md): Learn how to set how long users stay logged in to FusionAuth and to your applications.
- [Login Page Cookies](https://fusionauth.io/docs/authentication/sessions/cookies.md): Reference for the cookies that FusionAuth sets in the browser, including the SSO session cookie.
- [Enable SSO Across Applications](https://fusionauth.io/docs/authentication/sessions/enable-sso.md): Learn how to let users log in once and reach every application in a FusionAuth tenant without logging in again.
- [How Logout Works in FusionAuth](https://fusionauth.io/docs/authentication/sessions/how-logout-works.md): Learn about what each FusionAuth logout method ends, and how front-channel logout signs a user out of every application.
- [How Sessions Work in FusionAuth](https://fusionauth.io/docs/authentication/sessions/how-sessions-work.md): Learn about the sessions that keep a user logged in to FusionAuth and to your applications, and how the sessions relate.
- [Sessions, SSO, and Logout](https://fusionauth.io/docs/authentication/sessions.md): Learn about how FusionAuth keeps users logged in across applications, and how to configure session lifetimes, single sign-on, and logout.
- [Limit How Many Devices a User Can Log In From](https://fusionauth.io/docs/authentication/sessions/limit-concurrent-sessions.md): Learn how to cap the number of devices a user can stay logged in on at the same time.
- [Log Users Out of FusionAuth and Your Applications](https://fusionauth.io/docs/authentication/sessions/log-users-out.md): Learn how to log users out of one application or every application, and where to send users after logout.
- [View and Revoke User Sessions](https://fusionauth.io/docs/authentication/sessions/revoke-sessions.md): Learn how to list a user's sessions and end the sessions from the Admin UI, the API, or automatically.
- [Troubleshoot Sessions and Logout](https://fusionauth.io/docs/authentication/sessions/troubleshooting.md): Learn how to fix common problems with FusionAuth SSO, session lifetimes, and logout.
