You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ // ... custom logic after calling the endpoint implementation ...
80
+
+ });
81
+
```
82
+
83
+
For more information, see the [endpoints documentation](/bff/extensibility/management/index.mdx).
84
+
85
+
#### Custom Session Store
86
+
87
+
If you have a custom implementation of `IUserSessionStore`, the interface has changed to support multiple frontends.
88
+
89
+
In all methods, the `string key` has been replaced with a strongly typed `UserSessionKey` struct, which contains the `PartitionKey` and `SessionId`:
90
+
91
+
* `PartitionKey` - Corresponds to the frontend name (or `ApplicationName` in V3).
92
+
* `SessionId`: The user's session identifier.
93
+
94
+
```diff lang="csharp"
95
+
public class MySessionStore : IUserSessionStore
96
+
{
97
+
- public Task<UserSession> GetUserSessionAsync(string key, CancellationToken cancellationToken)
98
+
+ public Task<UserSession> GetUserSessionAsync(UserSessionKey key, CancellationToken cancellationToken)
99
+
{
100
+
// ...
101
+
}
102
+
103
+
// ...
104
+
}
105
+
```
106
+
107
+
Also see [related database changes and migrations](#server-side-sessions-database-migrations).
108
+
109
+
#### Access Token Retrieval
110
+
111
+
The `HttpContext.GetUserAccessTokenAsync` extension method has been removed from the `Duende.Bff` namespace. You should now use the extension method from the `Duende.AccessTokenManagement.OpenIdConnect` namespace.
See [ServetheindexpagefromtheBFFhost](/bff/architecture/ui-hosting.md#serve-the-index-page-from-the-bff-host) formoreinformation.
203
+
See [ServetheindexpagefromtheBFFhost](/bff/architecture/ui-hosting.md#serve-the-index-page-from-the-bff-host) formoreinformation.
135
204
136
-
### Proxying All Static Assets
205
+
### Proxying All Static Assets
137
206
138
207
WhendevelopingaSingle-PageApplication (SPA), it's very common to use a development webserver such as Vite. While Vite can publish static assets with a base URL, this doesn'tworkwellduringdevelopment.
Thisfunctionisevaluatedimmediately when calling the`.WithBffStaticAssets()` extension method. When you call this method during startup, the condition is only evaluated at startup time. It's not evaluated at runtime for every request.
233
+
Thisfunctionisevaluatedimmediately when calling the`.WithBffStaticAssets()` extension method. When you call this method during startup, the condition is only evaluated at startup time. It's not evaluated at runtime for every request.
0 commit comments