Refactor CSRF protection
This commit is contained in:
parent
59b565ae19
commit
eb17dbe33f
8 changed files with 20 additions and 45 deletions
|
|
@ -121,8 +121,7 @@ func (auth *Auth) authLogin(ctx context.Context) http.Handler {
|
|||
{Name: "otp", Type: httpx.TextField, EmptyOnError: true, Label: "Passcode (optional)"},
|
||||
},
|
||||
FieldTemplate: httpx.PureCSSFieldTemplate,
|
||||
|
||||
CSRF: auth.CSRF(),
|
||||
CSRF: true,
|
||||
|
||||
RenderForm: func(context httpx.FormContext, w http.ResponseWriter, r *http.Request) {
|
||||
if context.Err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue