API

Email/password Auth

20 steps 21 files 5 packages No dependencies

This pack adds email and password authentication to your API as JSON endpoints. It fits the guard your app already authenticates with, access tokens or session, enhancing your existing login and signup rather than replacing them. Every new account confirms its email address before it is treated as active.

  • Email verification for new signups, with a resend endpoint and a 403 on unverified access.
  • Rate-limited login and signup that penalise repeated failed attempts.
  • A branded, MJML-based confirmation email that links to your frontend.

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

$ claude
> /flow.apply auth

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

  • Discover your default guard, access tokens or session, and enhance the login and signup controllers you already have.
  • Land the backend as shipped, from the migrations and model mixin through the validators, the email-verifications controller, routes, middleware, and mailer.
  • Configure mail and the limiter, install Edge for the email templates, and point the verification link at your FRONTEND_URL.
  • Run the tests, drive the endpoints, and hand you a brief for the frontend to build against.
Terms & License Agreement