Hi @Cenk ,
You would not need to change the code of app.razor.
If you want to make the identity login page as your default starting page you can add @attribute [Authorize]
to the top of your _Host.cshtml file. This will ensure that, if the user is not authenticated, the Login page, which is not part of the Blazor App, would be displayed even before the Blazor App is completely rendered.
If you get the error: "The type or namespace 'Authorize' could not be found", please install the Microsoft.AspNetCore.Authorization
NuGet package and add an explicit reference to it.
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Chen Li