Skip to content

Suggestion ; fix(cli / UI ): @Html.AntiForgeryToken() and disable HTMX boost on auth forms to allow full-page redirects #23

Open

Description

@m2017atTR

Bug Description

src/Web/Bulonline.Web.Mvc/Areas/Account/Views/Account/Login.cshtml | Added @Html.AntiForgeryToken() to main login form
src/Web/Bulonline.Web.Mvc/Areas/Account/Views/Password/ForgotPassword.cshtml | Added @Html.AntiForgeryToken()
src/Web/Bulonline.Web.Mvc/Areas/Account/Views/Password/ResetPassword.cshtml | Added @Html.AntiForgeryToken()
src/Web/Bulonline.Web.Mvc/Areas/Account/Views/Account/Logout.cshtml | Added @Html.AntiForgeryToken()
src/Web/RazorPages/Bulonline.Web.RazorPages/Pages/Account/Login.cshtml | Added @Html.AntiForgeryToken()
src/Web/RazorPages/Bulonline.Web.RazorPages/Pages/Account/ForgotPassword.cshtml | Added @Html.AntiForgeryToken()
src/Web/RazorPages/Bulonline.Web.RazorPages/Pages/Account/ResetPassword.cshtml | Added @Html.AntiForgeryToken()
src/Web/RazorPages/Bulonline.Web.RazorPages/Pages/Account/Logout.cshtml | Added @Html.AntiForgeryToken()

fix(cli): disable HTMX boost on auth forms to allow full-page redirects

Auth forms (login, forgot/reset password, logout) in all UI engines
(Razor Pages, MVC, Blazor) now have hx-boost="false" so form submissions
perform full-page navigation. This fixes the redirect-after-login issue
where HTMX intercepted the 302 and left users on the login page with
OOB errors (#m-sidebar, #m-header not found).

cli/Templates/app/WebBlankLayout.sbn |
cli/Templates/app/Login.Web.cshtml.sbn | Login form: hx-boost="false"
cli/Templates/app/ForgotPassword.Web.cshtml.sbn | Form: hx-boost="false"
cli/Templates/app/ResetPassword.Web.cshtml.sbn | Form: hx-boost="false"
cli/Templates/app/Logout.Web.cshtml.sbn | Form: hx-boost="false"
cli/Templates/app/mvc/Login.cshtml.sbn | Login form: hx-boost="false"
cli/Templates/app/mvc/ForgotPassword.cshtml.sbn | Form: hx-boost="false"
cli/Templates/app/mvc/ResetPassword.cshtml.sbn | Form: hx-boost="false"
cli/Templates/app/mvc/Logout.cshtml.sbn | Form: hx-boost="false"
cli/Templates/app/blazor/Pages/Account/Login.razor.sbn | Login form: hx-boost="false"

Steps to Reproduce

Create all UI..
try login with seeded admin/pass
mvc and razor not redireting to home. this couses htmx oob errors.

Expected Behavior

login should redirect to home

Actual Behavior

without antiforgery 400
after fix 312 redirct and home 200 but htmx error happening.
becouse layout not loaded. for that full reload needed

.NET SDK Version

10

Modulus Version

x

Project Type

Modular Monolith

Activity

  1. added
    bug
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions