This repository has been archived on 2022-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
gosocial/web/templates/account/forgot_password.html
Noah Petherbridge 0caf12eb00 User Account Busywork
* Add "forgot password" workflow.
* Add ability to change user email address (confirmation link sent)
* Add ability to change user's password.
* Add rate limiter to deter brute force login attempts.
* Add user deep delete functionality (delete account).
* Ping user LastLoginAt every 8 hours for long-lived session cookies.
* Add age filters to user search page.
* Add sort options to user search (last login, created, username/name)
2022-08-14 14:40:57 -07:00

62 lines
2.2 KiB
HTML

{{define "title"}}Log In{{end}}
{{define "content"}}
<div class="container">
<section class="hero is-info is-bold">
<div class="hero-body">
<div class="container">
<h1 class="title">Reset Password</h1>
</div>
</div>
</section>
<div class="block p-4">
<form action="/forgot-password" method="POST">
{{ InputCSRF }}
<!-- With token: set a new password -->
{{if and .Token .User}}
<input type="hidden" name="token" value="{{.Token.Token}}">
<div class="field">
<label class="label">Username:</label>
<p>{{.User.Username}}</p>
</div>
<div class="field">
<label class="label" for="password">New password:</label>
<input type="password" class="input"
name="password"
id="password"
placeholder="Password">
</div>
<div class="field">
<label class="label" for="confirm">Confirm new password:</label>
<input type="password" class="input"
name="confirm"
id="confirm"
placeholder="Password">
</div>
<div class="field">
<button type="submit" class="button is-primary">Set password and sign in</button>
</div>
{{else}}
<p class="block">
Forgot your password? Enter your account username or email address below and we can
e-mail you a link to set a new password.
</p>
<div class="field">
<label class="label" for="username">Username or email:</label>
<input type="text" class="input" name="username" placeholder="username" autocomplete="off" required>
</div>
<div class="field">
<button type="submit" class="button is-primary">Send me a link to reset my password</button>
</div>
{{end}}
</form>
</div>
</div>
{{end}}