# Backend For Frontend (BFF) Samples

> A collection of sample applications demonstrating how to use the BFF security framework with different frontend technologies.

This section contains a collection of clients using our BFF security framework.

## JavaScript Frontend

[Section titled âJavaScript Frontendâ](#javascript-frontend)

This sample shows how to use the BFF framework with a JavaScript-based frontend (e.g. SPA).

[JavaScript Frontend Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/JsBffSample)GitHub Repository for the BFF framework with JavaScript-based frontend

## ReactJs Frontend

[Section titled âReactJs Frontendâ](#reactjs-frontend)

This sample shows how to use the BFF framework with the .NET 6 React template.

[ReactJS Frontend Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/React)GitHub Repository for the BFF framework with React

## Angular Frontend

[Section titled âAngular Frontendâ](#angular-frontend)

This sample shows how to use the BFF framework with the .NET 8 Angular template.

[Angular Frontend Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/Angular)GitHub Repository for the BFF framework with Angular

## Vue Frontend Community

[Section titled âVue Frontend âCommunity](#vue-frontend)

This sample shows how to use the BFF framework with the .NET 8 Vue template. (contributed by [@Marco Cabrera](https://github.com/mck231))

[Vue Frontend Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/Vue)GitHub Repository for the BFF framework with Vue

## Blazor WASM

[Section titled âBlazor WASMâ](#blazor-wasm)

This sample shows how to use the BFF framework with Blazor WASM.

[Blazor WASM Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/BlazorWasm)GitHub Repository for the BFF framework with Blazor WASM

## Blazor Auto Rendering

[Section titled âBlazor Auto Renderingâ](#blazor-auto-rendering)

This sample shows how to use Authentication in combination with Blazorâs AutoRendering feature.

[Blazor Auto Rendering Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/BlazorAutoRendering)GitHub Repository for the BFF framework using Blazor Auto Rendering

## YARP Integration

[Section titled âYARP Integrationâ](#yarp-integration)

This sample shows how to use the BFF extensions for Microsoft YARP.

[YARP Integration Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/JsBffYarpSample)GitHub Repository for the BFF framework integration with YARP

## OpenAPI and SwaggerUI

[Section titled âOpenAPI and SwaggerUIâ](#openapi-and-swaggerui)

This sample shows how to use OpenAPI and SwaggerUI in combination with BFF. A walkthrough is available [on the Duende blog](https://duendesoftware.com/blog/20250430-managing-openapi-specifications-with-backend-for-frontend-and-swagger-ui).

[OpenAPI and SwaggerUI Sample ](https://github.com/DuendeSoftware/samples/tree/main/BFF/v3/OpenApi)GitHub Repository for the BFF framework integration with OpenAPI and SwaggerUI

## Separate Host for UI

[Section titled âSeparate Host for UIâ](#separate-host-for-ui)

This sample shows how to have separate projects from the frontend and backend, using CORS to allow cross-site requests from the frontend to the backend.

[Separate Host for UI Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/SplitHosts)GitHub Repository for separate projects using CORS

## Docker Hosting Community

[Section titled âDocker Hosting âCommunity](#docker-hosting)

This sample shows how to host the BFF framework and IdentityServer with Docker. (contributed by [@Marco Cabrera](https://github.com/mck231))

[Docker Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/docker)GitHub Repository for hosting BFF and IdentityServer in with Docker containers.

## DPoP

[Section titled âDPoPâ](#dpop)

This sample shows how to configure the BFF to use [DPoP](/identityserver/tokens/pop/) to obtain sender-constrained tokens.

[DPoP Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/DPoP)GitHub Repository for configuring DPoP with BFF

## Token Exchange using the IAccessTokenRetriever

[Section titled âToken Exchange using the IAccessTokenRetrieverâ](#token-exchange-using-the-iaccesstokenretriever)

This sample shows how to extend the BFF with an *IAccessTokenRetriever*. This example of an IAccessTokenRetriever performs token exchange for impersonation. If you are logged in as alice you will get a token for bob, and vice versa.

[Token Exchange Sample ](https://github.com/DuendeSoftware/Samples/tree/main/BFF/v3/TokenExchange)GitHub Repository for token exchange using the IAccessTokenRetriever

## Feedback

[Section titled âFeedbackâ](#feedback)

Feel free to [ask the developer community](https://github.com/DuendeSoftware/community/discussions) if you are looking for a particular sample and canât find it here.

[Developer Community Forum ](https://github.com/DuendeSoftware/community/discussions)Join the Duende Developer Community for discussions and feedback
-----