I got 2 components with AuthorizeView :
MainLayout :
<AuthorizeView>
<Authorized>
<HeaderMenu />
<NavMenu />
<main class="w-full">
@Body
</main>
</Authorized>
<NotAuthorized>
@Body
</NotAuthorized>
</AuthorizeView>
NavMenu (contains the following piece of code) :
<AuthorizeView Roles="@(Role.SuperAdminRoleString + "," + Role.AdminRoleString)">
<Authorized>
<NavLink href="@ViewPaths.RegisterPage">
<span >Register a user</span>
</NavLink>
</Authorized>
</AuthorizeView>
NavMenu is MainLayout's child, it's not shown if user is not authorized, after a successful login the AuthorizeView of MainLayout works correctly and shows NavMenu but NavMenu's AuthorizeView is not working unless I refresh the page
I tried to call StateHasChanged() for NavMenu from MainLayout but it's not working, also force reload on redirection but it has a weird behavior (NavMenu is appearing before reload)