Closed Lesterdor closed 8 months ago
@Lesterdor thanks for contacting us.
This is by design. It's fundamentally impossible to have an interactive server component, that's why the auth pages on the templates set the render mode to static. We plan to provide a mechanism to force a component to render statically, but making HTTP semantics work over an interactive component is not something we'll ever do.
This is a dupe of https://github.com/dotnet/aspnetcore/issues/51046
Is there an existing issue for this?
Describe the bug
Hello community,
I have an interactive login page in the Blazor Server context (.NET 8).
I would like to authenticate with a cookie and I am facing the problem that the cookie cannot be set with the
<EditForm>
because the postback behavior is handled differently in Blazor.I'm unsure if it's a bug, but I can't find any documentation on how to realize the intention:
Login.razor (html form) - works as expected and a cookie is set:
Login.razor (EditForm) - No cookie is set
Program.cs
Routes.razor
App.razor
_Imports.razor
The Blazor Web App Template with the configuration: Authentication Type: Individual Accounts Interactive render mode: Server Interactivity location: Global
works because the render mode in App.razor is set to SSR in the case of "Account" pages.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
.NET 8
Anything else?
No response