Commit Graph

2 Commits

Author SHA1 Message Date
OlgunR
1ad267e409 Add authentication support with login/logout UI
- Introduced AuthService, IAuthApiClient, and AuthApiClient for managing authentication state and API calls (login, logout, session restore).
- Added Login.razor and LoginLayout.razor for the login page, including styling and logic.
- MainLayout.razor now checks authentication on load, restores sessions from sessionStorage, and redirects to /login if unauthenticated. Displays username and logout button when logged in.
- Implemented JS interop (authStorage) for persisting authentication info in sessionStorage.
- Registered AuthService, CookieContainer, and API clients in Program.cs to share cookies and support authentication.
- Updated AppSettings and appsettings files to support separate ApiBaseUrl and DataApiBaseUrl.
- Minor CSS improvements for username display in the top bar.
2026-05-12 16:32:46 +02:00
OlgunR
27c8f92a3b Refactor API base URL config to use AppSettings class
Replaced direct IConfiguration usage with a strongly-typed AppSettings class for accessing the API base URL. Registered AppSettings with DI and updated Dashboard.razor to use IOptions<AppSettings>. Updated using statements and DI setup for improved type safety and centralized configuration management.
2026-04-20 11:32:45 +02:00