This Next.js 14 demo showcases how how easy it is to add subscription functionality using Reflow Auth.
The app features a ready-to-use Reflow integration, including a pricing table to display subscription options and a button accessible only to subscribers.
You can view a live demo here - https://reflow-nextjs-subscriptions-demo.vercel.app/
To run the example, follow these steps
npm install
the dependencies in this folder- Create a copy of the
.env
file and name it.env.local
. Fill out the environment variables as described:
REFLOW_PROJECT_ID
- The ID of your Reflow project, required for using the library. You can obtain it from your Reflow project's settings page.SESSION_SECRET
- This is a secret string that will be used for encrypting user sessions. You can enter any random 32 char string or runopenssl rand -hex 16
in the terminal to generate a secret key.REFLOW_TEST_MODE
- (optional) Set this totrue
if you want to run the app in test mode.
- Start the development server with
npm run dev
- Open http://localhost:3000 with your browser to see the app.