-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Issue #51134 replace the LogoutForm into a standard post form. This can fix the problem that the LogoutForm won't work when nested in Interactive RenderMode, since it needs the HttpContext. The standard post form needs a form handler, but I did not find the endpoint definition of Account/Logout. Thre will be no handler for the logout form. If I get something wrong?
- <LogoutForm id="logout-form" />
- <NavLink class="nav-link" href="#" onclick="document.getElementById('logout-form').submit(); return false;">
- <span class="bi bi-arrow-bar-left-nav-menu" aria-hidden="true"></span> Logout
- </NavLink>
+ <form action="Account/Logout" method="post">
+ <AntiforgeryToken />
+ <input type="hidden" name="ReturnUrl" value="@currentUrl" />
+ <button type="submit" class="nav-link">
+ <span class="bi bi-arrow-bar-left-nav-menu" aria-hidden="true"></span> Logout
+ </button>
+ </form>
Describe the solution you'd like
Add the needed form handler if there is something wrong. If not, point out the existing handler code location.
Additional context
No response
Metadata
Metadata
Assignees
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.