Blazor WASM - Authentication occurs after content is displayed

Tim Cadieux 21 Reputation points
2022-08-20T11:42:17.407+00:00

I have successfully implemented the Auth process for Blazor WASM using this article - https://github.com/JeepNL/Blazor-WASM-Identity-gRPC

The strange behavior I'd like to correct is that the Index pages appears for a second or 2 and THEN i'm redirected to the Login page, where I am Authenticated and returned to the Index.

Is there a way to have the Auth process kick in sooner?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,390 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prathamesh Shende 376 Reputation points
    2022-09-18T17:32:07.303+00:00

    The problem is that Authentication takes first load then other contents
    It you enabled the authentication in your project.
    It because you add authenticationVIew in App.razor.

    I don't think there is any solution on this right now.

    0 comments No comments