Skip to content

Commit 394e417

Browse files
Expand Blazor BFF documentation to include session management link, improve clarity in code block formatting, and highlight pipeline configuration.
1 parent 17311c8 commit 394e417

File tree

1 file changed

+5
-4
lines changed
  • src/content/docs/bff/fundamentals/blazor

1 file changed

+5
-4
lines changed

src/content/docs/bff/fundamentals/blazor/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The Interactive Server mode allows developers to render pages built with Blazor
104104

105105
The BFF pattern is not typically applicable to this mode, as most interactivity is handled on the server by the Blazor Server framework with state changes being pushed to the client via WebSockets.
106106

107-
You may still want to explore `AuthenticationStateProvider` for managing authentication state, see the section below for more information.
107+
You may still want to explore `AuthenticationStateProvider` for managing authentication state, see the section below for more information. You may also want to explore the [Session Management](/bff/fundamentals/session/index.md) section for more information on how to configure the BFF to use sessions.
108108

109109
### Interactive WebAssembly
110110

@@ -131,15 +131,16 @@ You will also need to modify the `Program.cs` file in the `Server` project to co
131131
```csharp
132132
// Server/Program.cs
133133
builder.Services.AddBff()
134-
.AddServerSideSessions() // Add in-memory implementation of server side sessions
134+
// Add in-memory implementation
135+
.AddServerSideSessions()
135136
.AddBlazorServer();
136137
```
137138

138139
The `AddBlazorServer` method will configure the BFF to use services on the host that allow the client to interact with the server securely.
139140

140141
You will also need to modify the ASP.NET Core pipeline to use the BFF:
141142

142-
```csharp
143+
```csharp {25-26, 31-32}
143144
// Server/Program.cs
144145
var app = builder.Build();
145146

@@ -191,7 +192,7 @@ dotnet add package Duende.BFF.Blazor.Client
191192

192193
You will also need to modify the `Program.cs` file in the `Client` project to configure the BFF in the services collection:
193194

194-
```csharp
195+
```csharp {11-14}
195196
// Client/Program.cs
196197
using BlazorWasm.Client;
197198
using Duende.Bff.Blazor.Client;

0 commit comments

Comments
 (0)