> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Stytch's session layer

> Sessions provide a way to uniquely identify users on your application and maintain useful state information, such as detecting whether a user is logged in or not, determining access privileges, personalizing experiences, and building user insights.

> [card] [Start of a session](https://stytch.com/docs/multi-tenant-auth/manage-sessions/lifecycle/start-session.md)
>
> The session lifecycle through authentication to a full session.

## What is a session?

A session is a unique identifier for a member's authenticated state within an organization. It ties together the member's identity, authentication factors, and session metadata.

Once a member successfully authenticates, Stytch mints a Session object for the member—represented by two tokens:

### Session represented by tokens

> [card] [Member Session object](https://stytch.com/docs/api-reference/b2b/api/sessions/session-object.md)
>
> Represents an authenticated session for a specific member.

> [card] [session\_token](https://stytch.com/docs/multi-tenant-auth/manage-sessions/jwts-and-tokens.md#using-session-tokens)
>
> An opaque token that's verified via API call.

> [card] [session\_jwt](https://stytch.com/docs/multi-tenant-auth/manage-sessions/jwts-and-tokens.md#using-session-jwts)
>
> A signed token that can be locally verified.

***

## Session management

Stytch's SDKs provide a session management layer that abstracts token rotation, session validation, and more:

> [card] [Check for an active session](https://stytch.com/docs/multi-tenant-auth/manage-sessions/check-active-session.md)
>
> Control your application behavior based on whether a member has an active session.

> [card] [Authenticate a session](https://stytch.com/docs/multi-tenant-auth/manage-sessions/validate-session.md)
>
> Validate session tokens or JWTs before any action that requires authorization.

> [card] [Hydrate a session](https://stytch.com/docs/multi-tenant-auth/manage-sessions/hydrate-session.md)
>
> Hydrate the frontend session state from the backend.

> [card] [Authorize a user](https://stytch.com/docs/multi-tenant-auth/enterprise-ready/rbac/enforcing-permissions.md)
>
> Enforce RBAC permissions in your application’s frontend and backend.

> [card] [Add custom claims](https://stytch.com/docs/multi-tenant-auth/manage-sessions/custom-claims.md)
>
> Encode additional information into your session JWTs using custom claims.

> [card] [Cookies and sessions](https://stytch.com/docs/multi-tenant-auth/manage-sessions/cookies.md)
>
> Options for cookie configuration options and HttpOnly cookies.

### Session lifecycle

> [card] [Intermediate sessions](https://stytch.com/docs/multi-tenant-auth/manage-sessions/intermediate-sessions/overview.md)
>
> Handle sessions during authentication flows that require intermediate steps.

> [card] [Exchange sessions](https://stytch.com/docs/multi-tenant-auth/manage-sessions/lifecycle/exchange-session.md)
>
> Seamlessly switch a member's session between organizations.

> [card] [Extend sessions & session expiration](https://stytch.com/docs/multi-tenant-auth/manage-sessions/lifecycle/extend-or-expire-session.md)
>
> Session duration and extending the lifetime of a session.

> [card] [Revoke sessions](https://stytch.com/docs/multi-tenant-auth/manage-sessions/lifecycle/revoke-session.md)
>
> Immediately invalidate the session token, effectively logging the member out.
