You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
The FormTagHelper only targets <form> elements if various attributes are present, e.g. asp-controller. The default behavior of it rendering anti-forgery token fields thus only applies when these attributes are present. When used in Razor Pages however, the normal attributes are not used (as we're posting to another page typically), so the anti-forgery fields are not rendered unless the asp-antiforgery attribute is explicitly set, which is far less than ideal.
<formmethod="post" class="form-horizontal" asp-antiforgery="true"><h4>Use a local account to log in.</h4><hr/><divasp-validation-summary="All" class="text-danger"></div>
...
</form>
We want this to just work in Razor Pages, and it will be much more common there to post back to the current page, meaning no form action will need to be configured.
Shall we just make the FormTagHelper target all <form> elements by default now?