Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 626 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 626 Bytes

This is a simple example of how to use Next-Auth v5

To use it:

  1. git clone https://github.com/galsever/next-auth-simple-ex.git
  2. cp .env.example .env.local
  3. Set the env vars
  4. Then run:
bun i
bun dev

These files serve for authentication:

  • auth.ts
  • auth.config.ts
  • middleware.ts
  • prisma.ts
  • prisma/schema.prisma
  • api/auth/[...nextauth]/route.ts

localhost:3000 is accessible without a session, localhost:3000/dashboard is not

The Google & Nodemailer Provider are split on purpose, because otherwise next-auth doesn't work