eddiejbrady / IdentityServer4AspNetCoreIdentityTemplate

An ASP.NET Core IdentityServer4 Identity Bootstrap 4 template with localization

Home Page:https://www.nuget.org/packages/IdentityServer4AspNetCoreIdentityTemplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An ASP.NET Core IdentityServer4 Identity Template with Bootstrap 4 and Localization

Build status NuGet Status Change log

Features

  • ASP.NET Core 2.2
  • Latest ASP.NET Core Identity
  • Bootstrap 4 UI
  • Localization en-US, de-DE, it-IT, fr-FR, zh-Hans, de-CH, gsw-CH
  • 2FA
  • TOTP
  • Personal data, download, delete (part of Identity)
  • Azure AD, Cert, key vault deployments API
  • SendGrid Email API
  • npm with bundleconfig used for frontend packages
  • EF Core
  • Support for ui_locales using OIDC logins

some print screens:

it-IT

de-DE

en-US

fr-FR

zh-Hans

Using the template

install

From NuGet:

dotnet new -i IdentityServer4AspNetCoreIdentityTemplate

Locally built nupkg:

dotnet new -i IdentityServer4AspNetCoreIdentityTemplate.1.0.19.nupkg

run

dotnet new sts

Setup, Using the application for your System

  • Change the EF Core code from SQLite to your required database
  • Change the ApplicationUser class as required, remove/add the properties
  • Add the migrations and create the database
  • Define the deployment URLs, create the certs, and use these in your application (Startup, config files)
  • Add the external providers for login as required, or remove
  • Remove the UI views which are not required
  • Add remove the resource file localizations and also in the Startup.
  • Add the client configuration to the Config.cs class (dev, test, staging, prod, or whatever)
  • Update the claims in the IdentityWithAdditionalClaimsProfileService
  • Add the security headers as required, CSP, IFrame, XSS, HSTS, ...
  • If you deploy in a multi instance environment, add the session data to a database using the IdentityServer4.EntityFramework NuGet package

uninstall

dotnet new -u IdentityServer4AspNetCoreIdentityTemplate

Development

build

https://docs.microsoft.com/en-us/dotnet/core/tutorials/create-custom-template

nuget pack content/IdentityServer4AspNetCoreIdentityTemplate.nuspec

dotnet Migrations

open the cmd in project folder:

dotnet restore

dotnet ef migrations add sts_init --context ApplicationDbContext --verbose

dotnet ef database update  --verbose

Using Powershell to create the self signed certs:

New-SelfSignedCertificate -DnsName "sts.dev.cert.com", "sts.dev.cert.com" -CertStoreLocation "cert:\LocalMachine\My"

$mypwd = ConvertTo-SecureString -String "1234" -Force -AsPlainText

Get-ChildItem -Path cert:\localMachine\my\"The thumbprint..." | Export-PfxCertificate -FilePath C:\git\sts_dev_cert.pfx -Password $mypwd

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

  • IdentityServer4
  • IdentityServer4.AspNetIdentity
  • Microsoft.Azure.KeyVault
  • Microsoft.IdentityModel.Clients.ActiveDirectory
  • Sendgrid
  • NWebsec.AspNetCore.Middleware
  • Serilog

Links

http://docs.identityserver.io/en/release/

https://github.com/IdentityServer/IdentityServer4

https://getbootstrap.com/

https://nodejs.org/en/

https://www.npmjs.com/

About

An ASP.NET Core IdentityServer4 Identity Bootstrap 4 template with localization

https://www.nuget.org/packages/IdentityServer4AspNetCoreIdentityTemplate/

License:MIT License


Languages

Language:C# 42.6%Language:CSS 38.3%Language:HTML 19.0%Language:JavaScript 0.1%