Password recovery form
If you built your own login form, add these two forms so users can reset their password without leaving your site.
Password recovery
Password recovery is a two-step process:
Step 1: Request password reset code
This form sends a reset code to the user's email address.
html
<form method="POST" action="https://your-store.garnet.center/auth/public/change-password/request" target="_blank">
<label for="email">Email:</label>
<input type="email" name="email" required />
<button>Send reset code</button>
</form>Step 2: Set new password
After receiving the code via email, the user can set a new password.
html
<form method="POST" action="https://your-store.garnet.center/auth/public/change-password/update" target="_blank">
<label for="email">Email:</label>
<input type="email" name="email" required />
<label for="code">Code (from email):</label>
<input type="text" name="code" required />
<label for="password">New password:</label>
<input type="password" name="password" minlength="8" required />
<input type="hidden" name="redirect" value="/" />
<button>Update password</button>
</form>