* Turned off Login as it is not working

This commit is contained in:
2025-03-01 06:35:28 +01:00
parent b8fbb789ad
commit f321677447
19 changed files with 122 additions and 154 deletions

View File

@@ -1,6 +1,4 @@
@page "/ScheduleOrders"
@attribute [Authorize]
@page "/"
@using System.Security.Claims
@using Microsoft.AspNetCore.Authorization
@@ -20,17 +18,17 @@
{
if (firstRender)
{
ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
if (currentUser.Identity?.IsAuthenticated == false)
{
NavigationManager.NavigateTo("/Unauthorized");
}
else
{
// ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
//
// if (currentUser.Identity?.IsAuthenticated == false)
// {
// NavigationManager.NavigateTo("/Unauthorized");
// }
// else
// {
_scheduleOrders = await FetchScheduleOrdersAsync();
StateHasChanged();
}
// }
}
}