Add csrf token to sign_up and sign_in templates

This commit is contained in:
Mirai Kumiko 2025-06-21 12:29:33 +02:00
parent 5cb937c14c
commit f7f4d43a8b
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
2 changed files with 2 additions and 0 deletions

View file

@ -1,5 +1,6 @@
<main class="flex min-h-screen items-center justify-center"> <main class="flex min-h-screen items-center justify-center">
<form class="flex flex-col gap-2" action="/auth/sign_in" method="post"> <form class="flex flex-col gap-2" action="/auth/sign_in" method="post">
<input type="hidden" name="_csrf_token" value={get_csrf_token()} />
<label for="email">E-mail address *</label> <label for="email">E-mail address *</label>
<input id="email" name="email" type="email" maxlength="50" required /> <input id="email" name="email" type="email" maxlength="50" required />
<label for="password">Password *</label> <label for="password">Password *</label>

View file

@ -1,5 +1,6 @@
<main class="flex min-h-screen items-center justify-center"> <main class="flex min-h-screen items-center justify-center">
<form class="flex flex-col gap-2" action="/auth" method="post"> <form class="flex flex-col gap-2" action="/auth" method="post">
<input type="hidden" name="_csrf_token" value={get_csrf_token()} />
<label for="username">Username *</label> <label for="username">Username *</label>
<input id="username" name="username" type="text" maxlength="30" required /> <input id="username" name="username" type="text" maxlength="30" required />
<label for="email">E-mail address *</label> <label for="email">E-mail address *</label>