Use csrf tokens and validation with login and register forms

This commit is contained in:
max
2022-11-14 12:29:55 -06:00
parent 2f631cf3ee
commit 1eb278c4b9
4 changed files with 52 additions and 4 deletions

View File

@ -2,6 +2,8 @@
{{ define "content" }}
<form action="/register-handle" method="post">
<input type="hidden" name="csrf_token" value="{{ .csrfToken }}">
<label for="username">Username:</label><br>
<input id="username" name="username" type="text" value="John"><br><br>
<label for="password">Password:</label><br>