BlazorStart/Start/Client/App.razor

30 lines
1 KiB
Plaintext
Raw Permalink Normal View History

2021-12-04 00:44:02 +00:00
<Fluxor.Blazor.Web.StoreInitializer />
2021-11-13 03:21:59 +00:00
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
2021-12-09 06:03:12 +00:00
<AuthorizeRouteView RouteData="@routeData">
<Authorizing>
<div class="text-center authorizingContainer">
<div class="loading loading-lg"></div>
Authorizing...
</div>
</Authorizing>
2021-11-13 03:21:59 +00:00
<NotAuthorized>
@if (!context.User.Identity?.IsAuthenticated ?? false)
{
<RedirectToLogin />
}
else
{
<p>You are not authorized to access this resource.</p>
}
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound>
2021-12-09 06:03:12 +00:00
<p>Sorry, there's nothing at this address.</p>
2021-11-13 03:21:59 +00:00
</NotFound>
</Router>
</CascadingAuthenticationState>