I have created Dotnet aspire project and implemented JWT Authentication. In Dotnet aspire it creates 4 projects Api, Apphost, Service defaults, Blazor Server App.
When I am refreshing page in my Blazor server App without Authorize attribute GetAuthenticationStateAsync() is hitting and it is working fine. When I am refreshing the page with Authorize attribute GetAuthenticationStateAsync() method not hitting. I am not getting any errors also. I am getting the blank screen.
I have tried several ways like registering order of the services.
Can anyone help me to resolve this?
prasad sivvala is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.