Use csrf tokens and validation with login and register forms
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
{{ define "content" }}
|
||||
<form action="/login-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>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user