This is a simple authentication system that uses Next.js 14, Authjs v5 and Prisma. It supports authentication with email and password, GitHub and Google.
- Clone the repository and install the dependencies
git clone https://github.com/oyal/authjs-prisma.git
cd authjs-prisma
npm install
- Configure the environment variables
Copy the .env.example
file to .env
and fill in the required values.
cp .env.example .env
- Database setup
Update the DATABASE_URL
in the .env
file with your database connection string.
npx prisma db push
- Run the development server
npm run dev
Open http://localhost:3000 with your browser to see the result.