API

Forgot password

10 steps 8 files 0 packages 1 dependencies

This pack adds password-recovery endpoints. A user who forgets their password requests a reset link by email through a public endpoint, then submits a new password with the token carried in that link.

  • The request endpoint returns the same response whether or not the email is registered, so it cannot be used to discover which addresses have accounts.
  • Both the reset email and the request endpoint are throttled against abuse.
  • A branded, MJML reset-password email that links to your frontend with the token.
Depends on Auth

This pack extends the auth pack's User model and reuses its transactional email setup. Apply the auth pack first.

Apply the forgot password pack with Flow. Start a new session in your selected coding agent and execute the following slash command inside it.

$ claude
> /flow.apply forgot-password

After applying, Flow will make the following changes to your app.

  • Land the backend as shipped, from the password-reset table and the User mixin through the validators, the controller, the reset mailer and email template.

  • Add the request and reset endpoints to your public API group.

  • Run the tests, then drive the endpoints and show you the result.

Terms & License Agreement