Created
June 14, 2024 01:03
-
-
Save blaiseAI/686809de811dc791e74de12e4c2d2d2b to your computer and use it in GitHub Desktop.
Authentication With Authorization Dotnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notes for Basic Authentication/Authorization in Blazor | |
Resources: | |
ASP.NET Core Blazor authentication and authorization | |
https://docs.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-3.1 | |
IdentityManager | |
https://github.com/mguinness/IdentityManager/ | |
Download: https://github.com/mguinness/IdentityManager/archive/master.zip | |
Customize IdentityManager: | |
Startup.cs: | |
Change: | |
services.AddDbContext<ApplicationDbContext>(options => | |
options.UseSqlite(Configuration.GetConnectionString("DefaultConnection"))); | |
To: | |
services.AddDbContext<ApplicationDbContext>(options => | |
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); | |
appsettings.json: | |
Change "DefaultConnection" to your app's Identity DB connection string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment