Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damienbod/blazor.bff.openidconnect.template
Blazor.BFF.OpenIDConnect.Template, Blazor WASM hosted in ASP.NET Core using OpenID Connect BFF (server authentication)
https://github.com/damienbod/blazor.bff.openidconnect.template
aspnet-core bff blazor dotnet oauth2 oidc openid-connect wasm
Last synced: 2 days ago
JSON representation
Blazor.BFF.OpenIDConnect.Template, Blazor WASM hosted in ASP.NET Core using OpenID Connect BFF (server authentication)
- Host: GitHub
- URL: https://github.com/damienbod/blazor.bff.openidconnect.template
- Owner: damienbod
- License: mit
- Created: 2021-12-25T11:20:50.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T07:42:16.000Z (about 1 month ago)
- Last Synced: 2025-01-11T23:04:13.286Z (9 days ago)
- Topics: aspnet-core, bff, blazor, dotnet, oauth2, oidc, openid-connect, wasm
- Language: CSS
- Homepage: https://www.nuget.org/packages/Blazor.BFF.OpenIDConnect.Template/
- Size: 4.35 MB
- Stars: 132
- Watchers: 9
- Forks: 18
- Open Issues: 11
-
Metadata Files:
- Readme: README-NUGET.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Blazor.BFF.OpenIDConnect.Template
[![.NET](https://github.com/damienbod/Blazor.BFF.OpenIDConnect.Template/actions/workflows/dotnet.yml/badge.svg)](https://github.com/damienbod/Blazor.BFF.OpenIDConnect.Template/actions/workflows/dotnet.yml) [![NuGet Status](http://img.shields.io/nuget/v/Blazor.BFF.OpenIDConnect.Template.svg?style=flat-square)](https://www.nuget.org/packages/Blazor.BFF.OpenIDConnect.Template/) [Change log](https://github.com/damienbod/Blazor.BFF.OpenIDConnect.Template/blob/main/Changelog.md)
This template can be used to create a Blazor WASM application hosted in an ASP.NET Core Web app using OpenID Connect to authenticate using the BFF security architecture. (server authentication) This removes the tokens from the browser and uses cookies with each HTTP request, response. The template also adds the required security headers as best it can for a Blazor application.
## Features
- WASM hosted in ASP.NET Core 9
- BFF (backend for frontend) with Standard OpenID Connect
- OAuth2 and OpenID Connect OIDC
- No tokens in the browser## Using the template
### install
```
dotnet new install Blazor.BFF.OpenIDConnect.Template
```### run
```
dotnet new blazorbffoidc -n YourCompany.Bff --HttpsPortCustom 44348
```Use the `-n` or `--name` parameter to change the name of the output created. This string is also used to substitute the namespace name in the .cs file for the project.
## Setup after installation
Add the OpenID Connect App registration settings
```
{
"OpenIDConnectSettings": {
"Authority": "--your-authority--",
"ClientId": "--client ID--",
"ClientSecret": "--client-secret (user secrets)--"
},
```### uninstall
```
dotnet new uninstall Blazor.BFF.OpenIDConnect.Template
```## Credits, Used NuGet packages + ASP.NET Core 9.0 standard packages
- NetEscapades.AspNetCore.SecurityHeaders
## Links
https://github.com/andrewlock/NetEscapades.AspNetCore.SecurityHeaders