Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find a source "Authorizing..." message comes from in a Blazor Web Assembly app?

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?

like image 544
Anthony Avatar asked Dec 19 '25 12:12

Anthony


1 Answers

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>
like image 105
Anthony Avatar answered Dec 24 '25 09:12

Anthony



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!