<AuthorizeView> <Authorized> <h1>Hello, @context.User.Identity.Name!</h1> <p>You can only see this content if you're authenticated.</p> </Authorized> <Authorizing> <h1>Authentication in progress</h1> <p>You can only see this content while authentication is in progress.</p> </Authorizing> </AuthorizeView>
This approach isn’t normally applicable to Blazor Server apps. Blazor Server apps know the authentication state as soon as the state is established. Authorizing content can be provided in a Blazor Server app’s AuthorizeView component, but the content is never displayed.