Blazor.BFF.OpenIDConnect.Template 1.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet new install Blazor.BFF.OpenIDConnect.Template::1.2.1
This package contains a .NET Template Package you can call from the shell/command line.

Blazor.BFF.OpenIDConnect.Template

.NET NuGet Status Change log

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 form 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 6
  • BFF with Azure AD using Microsoft.Identity.Web
  • OAuth2 and OpenID Connect OIDC
  • No tokens in the browser

Using the template

install

dotnet new -i Blazor.BFF.OpenIDConnect.Template

run

dotnet new blazorbffoidc -n YourCompany.Bff

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 -u Blazor.BFF.OpenIDConnect.Template

Credits, Used NuGet packages + ASP.NET Core 6.0 standard packages

  • NetEscapades.AspNetCore.SecurityHeaders

https://github.com/andrewlock/NetEscapades.AspNetCore.SecurityHeaders

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.3 1,805 2/1/2024
3.0.2 948 1/14/2024
3.0.1 1,395 12/31/2023
3.0.0 1,857 11/26/2023
2.1.3 4,303 11/3/2023
2.1.2 3,153 10/25/2023
2.0.4 2,521 8/6/2023
2.0.3 4,423 7/8/2023
2.0.2 3,556 3/11/2023
2.0.1 1,547 1/22/2023
2.0.0 3,677 12/2/2022
1.2.8 9,602 9/23/2022
1.2.7 8,587 8/26/2022
1.2.6 3,045 8/12/2022
1.2.5 3,029 8/7/2022
1.2.4 1,165 8/7/2022
1.2.3 7,331 7/9/2022
1.2.2 6,123 6/19/2022
1.2.1 7,908 5/21/2022
1.2.0 438 5/20/2022
1.1.0 7,970 3/20/2022
1.0.8 8,983 2/11/2022
1.0.7 4,604 1/23/2022
1.0.6 936 1/21/2022
1.0.5 428 1/18/2022
1.0.4 564 1/17/2022
1.0.3 1,286 1/9/2022
1.0.1 1,596 1/4/2022
1.0.0 2,351 12/25/2021

use of expression bodies, use new top-level statements and remove, enable ImplicitUsings, add IAntiforgeryHttpClientFactory/AntiforgeryHttpClientFactory, Replace of IdentityModel with System.Security.Claims and remove IdentityModel nuget package