BlazorStart/Start/Client/App.razor

24 lines
814 B
Plaintext
Raw 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">
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>