@inject NavigationManager Navigation
@inject IJSRuntime Js

@code {
    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (!firstRender)
            return;

        await Js.InvokeVoidAsync("taxbaikAdminSession.clearAuthToken");
        var returnUrl = Uri.EscapeDataString(Navigation.ToBaseRelativePath(Navigation.Uri));
        Navigation.NavigateTo($"/taxbaik/admin/login?returnUrl={returnUrl}", replace: true);
    }
}
