3

In a simple Blazor Web Assembly App created in Visual Studio with the "Individual User Accounts" option enabled, there is a message "Authorizing..." that appears on page loading:

enter image description here

In an attempt to change its representation, I'm struggling to find where it comes from. Tried to search:

  • a solution;
  • "All" scaffolded identity pages;
  • AuthenticationService.js;
  • blazor.webassembly.js;

Any ideas where it can hide?

Anthony
  • 2,715
  • 5
  • 26
  • 34

1 Answers1

4

Turns out it is a default value of an AuthorizeRouteView component's parameter Authorizing. To change it just needed to set fragment explicitly:

        <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
            <Authorizing>
                <div class="spinner"></div>
            </Authorizing>
            <NotAuthorized>
                @if (!context.User.Identity.IsAuthenticated)
                {
                    <RedirectToLogin />
                }
                else
                {
                    <p>You are not authorized to access this resource.</p>
                }
            </NotAuthorized>
        </AuthorizeRouteView>
Anthony
  • 2,715
  • 5
  • 26
  • 34