Adding a scannable QR code image to your ASP.Net Core 8 website. This adds a generated QR code image to the web page, which can then be easily scanned by a mobile app.
If you want more ASP.Net Core security tips, visit my Pluralsight course here: https://link.devsecforge.com/ps-aspnet
GitHub repo for this code:
https://github.com/gavjl/ASP.Net-Core...
Checkout my Pluralsight courses on software dev / security: https://link.devsecforge.com/ps-auth
Blog walkthrough:
https://www.gavinjl.me/asp-net-core-m...
Installed packages:
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore
dotnet add package Microsoft.DotNet.Scaffolding.Shared
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package Microsoft.AspNetCore.Identity.UI
dotnet add package Microsoft.EntityFrameworkCore.Tools
Scaffholding:
dotnet aspnet-codegenerator identity --files "Account.Register;Account.Login;Account.Logout;Account.RegisterConfirmation;Account.ResetPassword;Account.ResetPasswordConfirmation;Account.Manage.Disable2fa;Account.Manage.TwoFactorAuthentication;Account.Manage.EnableAuthenticator" --databaseProvider sqlite
Entity Framework:
dotnet-ef migrations add Identity
dotnet-ef database update
QR Code JavaScript:
https://github.com/davidshimjs/qrcode...
Covers "V2.8 One Time Verifier" of ASVS version 4.03 up to level 2