I'm trying to build a Blazor application that is hosted on the server and the starting point is inside a razor page. Something like that:
<component type="typeof(Main)" render-mode="ServerPrerendered" param-Data="@simple"/>
My questions are:
- What happens if the razor page has an Authorized Attribute, is all blazor code than correctly secured with the authentication ?
- Is it impossible to call the blazor app without the razor page circuit id ?
What if my razor page does have a custom authentication based on database values inside the
OnGetAsyncmethod - do I need to redo some of that stuff inside blazor or does the stateful component only gets rendered when the razor page works ?What happens if I have an arbitrary if/else block that would have a button call, would that button call be guarded by the state ?
Something along the lines:
@if (HasPermission)
{
<button type="button" onclick="MutateDatabase">MutateDatabase</button>
}