Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Server-side Sessions"
title: "Server-Side Sessions"
description: "Learn how to implement and configure server-side sessions in BFF to manage user session data storage and enable session revocation capabilities"
sidebar:
order: 40
Expand All @@ -21,7 +21,7 @@ Duende.BFF includes all the plumbing to store your sessions server-side. The coo
* the cookie size will be very small and constant - regardless how much data (e.g. token or claims) is stored in the authentication session
* the session can be also revoked outside the context of a browser interaction, for example when receiving a back-channel logout notification from the upstream OpenID Connect provider

## Configuring Server-side Sessions
## Configuring Server-Side Sessions

Server-side sessions can be enabled in the application's startup:

Expand All @@ -32,7 +32,7 @@ builder.Services.AddBff()

The default implementation stores the session in-memory. This is useful for testing, but for production you typically want a more robust storage mechanism. We provide an implementation of the session store built with EntityFramework (EF) that can be used with any database with an EF provider (e.g. Microsoft SQL Server). You can also use a custom store. See [extensibility](/bff/extensibility/sessions.md#user-session-store) for more information.

## Using Entity Framework for the Server-side Session Store
## Using Entity Framework for the Server-Side Session Store

To use the EF session store, install the `Duende.BFF.EntityFramework` NuGet package and register it by calling `AddEntityFrameworkServerSideSessions`, like this:

Expand Down