Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -28,7 +28,7 @@ builder.Services.AddBff(options =>
};
```

Starting with BFF v4, the BFF automatically wires up the management endpoints. If you disable this behavior (using `AutomaticallyRegisterBffMiddleware`, this is how you can map the management endpoints:
Starting with BFF v4, the BFF automatically wires up the management endpoints. If you disable this behavior (using `AutomaticallyRegisterBffMiddleware`), this is how you can map the management endpoints:

```csharp
// Program.cs
Expand All @@ -51,10 +51,9 @@ The `UsePreprocessing` method adds all handling for multiple frontend support. A
``` csharp
app.UseBffFrontendSelection();
app.UseBffPathMapping();
app.UseBffOpenIdCallbacks();~
app.UseBffOpenIdCallbacks();
```


`UseBffPostProcessing` adds all BFF management endpoints and handlers for proxying `index.html`. You can also map each endpoint individually by calling the various `MapBffManagementXxxEndpoint` methods, for example `endpoints.MapBffManagementLoginEndpoint()`.

The following pages describe the default behavior of the management endpoints. See the [extensibility](/bff/extensibility) section for information about how to customize the behavior of the endpoints.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ And then in JavaScript:
document.querySelector('#bff-silent-login').src = '/bff/silent-login';
```

:::tip
In BFF v4, set the iframe's src attribute to the login endpoint instead using the query parameter `prompt=none`:

```javascript
document.querySelector('#bff-silent-login').src = '/bff/login?prompt=none';
```

See [OIDC Prompt support](/bff/fundamentals/session/oidc-prompts.md) for additional information.
:::

To receive the result, the application should handle the *message* event in the browser and look for the *data.isLoggedIn* property on the event object:

```javascript
Expand Down
14 changes: 10 additions & 4 deletions astro/src/content/docs/bff/fundamentals/session/oidc-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ The `prompt` parameter can be used in situations where additional security is re

## Silent Login Deprecation (v3 to v4)

When migrating from Duende BFF v3 to v4, you may notice deprecation warnings regarding the [silent login](/bff/fundamentals/session/management/silent-login.md) feature found at the user endpoint of `/silent-login`. You should discontinue use of the silent login feature and instead use the `prompt=none` parameter to achieve the same result.



When migrating from Duende BFF v3 to v4, you may notice deprecation warnings regarding the [silent login](/bff/fundamentals/session/management/silent-login.md)
feature located at the management endpoint `/silent-login`.

To resolve the warning, update the silent login URL in your frontend applications to point to the login endpoint instead, including the `prompt=none`
query parameter:

```diff
-const silentLoginPath = '/bff/silent-login';
+const silentLoginPath = '/bff/login?prompt=none';
```

By default, BFF v4 [automatically registers the management endpoints](/bff/fundamentals/session/management/index.md). In case you opted out of the automatic registration feature,
you may still need to explicitly call `app.MapBffManagementSilentLoginEndpoints()` if you are manually mapping the management endpoints.
Loading