Resets forgotten passwords. The client's /login page asks for a reset
link, which the email takes to the /reset-password page, whose token
names the reset.
POST /api/password-resets— public. Emails a reset link to the account with thatemail, if any; always answers 200.PUT /api/password-resets/:token— public, with a reset token. Sets thenewPassword, which ends the user's sessions here and on the instances they signed in to.
v
default: Router
Mounted by api/main.ts behind the error, Open Graph and CORS middleware.
An APIException thrown by a handler becomes the JSON error response there.
Usage
import * as mod from "api/routes/password-resets.ts";