Forgot Password

How to set up forgot password flow using Authverse.

Authverse streamlines the addition of a "Forgot Password" flow with a single command.

Setup email

Authverse supports multiple email providers (Gmail, Resend, AWS SES).

If you haven't set up an email provider yet, the command below will prompt you to choose one. See Email Integration for more details.

Execute the following command:

npx authverse@latest forget

This command automatically:

  • Checks for existing email configuration (and helps you set it up if missing).
  • Injects password reset logic.
  • Creates the email handler.
  • Sets up the API route.
  • Adds required environment variables.
  • Configures the email template.

Environment Configuration

If you are setting up email for the first time during this process, the CLI will ask you to add specific environment variables for your chosen provider.