This is a Next.js project bootstrapped with create-next-app.
Before running the project, make sure you have Node.js installed on your machine. You can download it from Node.js official website.
First, install the project dependencies:
npm install
# or
yarn installThen, run the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
To set up authentication for local development, follow the guide provided by AuthJS:
This guide will help you configure OAuth authentication, which is essential for logging in to the application locally.
Ensure you have created OAuth credentials (Client ID and Client Secret) in your OAuth provider's console and have set up the necessary redirect URIs pointing to your local development environment, typically http://localhost:3000/api/auth/callback/provider-name.
Add the following environment variables to your .env.local file:
AUTH_SECRET="REPLACE ME"
AUTH_GOOGLE_ID=your_oauth_client_id
AUTH_GOOGLE_SECRET=your_oauth_client_secret
Replace your_oauth_client_id and your_oauth_client_secret with your actual OAuth credentials.
AUTH_SECRET is a random token used by the library to encrypt tokens and email verification hashes, and it’s mandatory to keep things secure (See Deployment to learn more). You can use the CLI to generate an auth secret.
npm exec auth secret
# or
yarn auth secretTo learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
For more details on deploying to Vercel, visit: