Skip to content

Folder Layout Modification and Authentication Complete#2

Closed
TwistedFury wants to merge 7 commits intomasterfrom
authentication
Closed

Folder Layout Modification and Authentication Complete#2
TwistedFury wants to merge 7 commits intomasterfrom
authentication

Conversation

@TwistedFury
Copy link
Copy Markdown
Owner

PR Classification

New feature and architectural refactor: implements custom authentication and user management using ASP.NET Core Identity and JWT, replacing OIDC/Auth0.

PR Summary

This PR introduces a new ASP.NET Core Web API backend with Identity and JWT authentication, updates the Blazor WebAssembly client to use a custom authentication provider, and removes the previous OIDC/Auth0 integration.

  • Adds DungeonMasterDashboard.Server project with Identity, EF Core migrations, AccountController, and API configuration.
  • Updates client Program.cs and introduces CustomAuthenticationStateProvider for JWT-based login, logout, and registration.
  • Replaces authentication UI with new Authentication.razor, Profile.razor, and updates LoginDisplay.razor and NavMenu.razor for auth state awareness.
  • Removes OIDC/Auth0 code and Weather.razor sample from the client.
  • Updates solution and configuration files to support the new client-server architecture.

Implement custom authentication for Blazor WASM app

Replaced OIDC with a custom token-based authentication system using a new CustomAuthenticationStateProvider. Added a custom login form in Authentication.razor and updated navigation to show links only to authorized users. Removed client-side EF Core and related ApplicationDbContext. Updated Program.cs to configure HttpClient and authentication services. Added necessary package references and configuration for the new authentication flow.
- Switched to custom authentication using Blazored.LocalStorage for token management; removed Microsoft.AspNetCore.Components.WebAssembly.Authentication.
- Added registration flow and validation to Authentication.razor.
- Introduced RegisterDto and UserProfile models.
- Added Profile page to display user info; requires authorization.
- Updated login/register/profile navigation and routes.
- Removed Weather page and its navigation link.
- Improved UI and error handling in forms.
- Updated README and cleaned up Home page.
@TwistedFury
Copy link
Copy Markdown
Owner Author

I will probably transition to trying to use Microsoft Azure for User Auth instead of what I'm using in this PR. I've realized that the way that this one is setup will be reliant on client-side data rather than it being hosted through the server. This gave me experience with building an API, but will probably not be what we use going forward.

@TwistedFury
Copy link
Copy Markdown
Owner Author

Project has gone elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant