I have Blazor Application in ASP.NET Core 8.0, and I'm dealing with a problem with AuthenticationState.
I extended the AuthorizeView class and overrided OnParametersSetAsync() method to implement custom authorization logic.
In OnParametersSetAsync() method i'm accessing to the AuthenticationState through AuthenticationStateProvider instance (from Dependency injection).
If i run my application in debug i can notice that the AuthenticationState it's not always the same, It's like I have 2 instances of AuthenticationState.
protected override async Task OnParametersSetAsync(){ var hashcode = _authStateProvider.GetAuthenticationStateAsync().GetHashCode(); // Breakpoint here}
I expect the AuthenticationState hashcode is always be the same.