Closed rwxzig closed 1 month ago
refer to public/index.razor in the project, this page is created from PublicLayout. and if not login can be navigated to Login.
I tried and I get the same behaviour, when I click sign in, the error is raised, and unless the user performs a reload, it wont be able to sign in.
Changed the title because this error occurs when signing in from a page that is using PublicLayout
I tried and I get the same behaviour, when I click sign in, the error is raised, and unless the user performs a reload, it wont be able to sign in.
Edit.1:
Changed the title because this error occurs when signing in from a page that is using
PublicLayout
<MudButton Variant="Variant.Text" Href="/pages/authentication/login" StartIcon="@Icons.Material.Rounded.Login" Style="text-transform:none"> @L["Login"] OR RedirectManager.RedirectTo(LoginPage url);
Could you elaborate a bit more? Thanks in advance.
Could you elaborate a bit more?
Thanks in advance.
Could you share your code
The only difference that I have is that Dashboard.razor
is no longer home route, instead it is:
@page "/dashboard"
@using CleanArchitecture.Blazor.Server.UI.Pages.Dashboard.Components
@using MudBlazor.Utilities
@inject IStringLocalizer<Dashboard> L
<PageTitle>@Title</PageTitle>
And public /Public/Index.razor
is set as home route page:
@page "/"
<PageTitle>@Title</PageTitle>
<h2>Clean Architecture With Blazor Server</h2>
<p>This repository guides ... </p>
@code {
}
Just to add to the context, I have a use case where I must use the PublicLayout
as layout in my home page and being able to allow the user to sign in from that page.
No problems with my debugging, change public\index.razor to @page "/" change Dashboard\dashboard.razor @page "/dashboard/index"
I created a small video to demonstrate the issue. Here is a private youtube link so that you can see (39 sec). I tried to capture all the essential information, in case that you want to replicate. It a clean git clone, and only two files are changed, as demonstrated on the clip.
I am getting an error when I click sign in and the home page is a page that is using the public layout. My case is that I have created a page "Home" that looks something like this:
In this case it returns this error (below) when I click sign in:
When
Dashboard
page is set as homepage, everything is fine. Any idea on how to fix this behaviour?