Skip to content

A simple example of how to send password reset notifications for a Next.js app using Courier

Notifications You must be signed in to change notification settings

trycourier/courier-nextjs-password-reset

Repository files navigation

Next.js + Courier

This is a Next.js project that is integrated with Courier and Vercel KV.

Check-out this deep dive into how this app was built for more details.

Getting Started

Clone the repo and install dependencies:

npm install

Prerequisites

In order to run this app, you'll need:

  1. A free Courier account
  2. A free Vercel account

Configure Courier and Vercel accounts

Follow the instructions in this companion blog post to:

  • Retrieve your Courier API key
  • Set-up email and SMS providers for Courier
  • Set-up email and SMS notification templates
  • Create a Vercel KV DB

Create a .env.local file at the root of the project to store secrets for Courier and Vercel.

COURIER_AUTH_TOKEN=pk_prod_xxx
COURIER_TEMPLATE=yyy
KV_URL="redis://default:[email protected]:34698"
KV_REST_API_URL="https://zzz.kv.vercel-storage.com"
KV_REST_API_TOKEN="abcdef"
KV_REST_API_READ_ONLY_TOKEN="abcdef"

Running the app

Open http://localhost:3000 in your browser.

Click "Create User" to create a user whose password you want to test resetting.

Next, click "Forgot Password" and enter the email or phone number of the User that you just created.

Deploy

Check out the Next.js deployment documentation for more details.

Learn More

To learn more about Courier, take a look at the following resources:

  • Sign-up - Sign up and get 10k messages/month for free.
  • Docs - Platform and API reference docs
  • Integrations - Full list of SMS, email and eventing integrations.
  • Changelog - See what we've fixed and what we've shipped every week.

About

A simple example of how to send password reset notifications for a Next.js app using Courier

Resources

Stars

Watchers

Forks

Packages

No packages published