A Reusable Authentication Codebase For Your Next(.js) Project
A reusable Auth.JS 5.0.0 beta (former NextAuth) codebase with examples to implement in your Next.JS project.
This project is based on Antonio Erdeljac's next auth v5 guide. On top of this i fixed some bugs and added the email verification when email has been changed.
- Login via credentials and OAuth
- Email verification (for email and password change)
- Two factor authentication via email code
- Roles
- Examples using server actions and api calls
- Change user data and password
- Next.JS 14
- Auth.JS 5.0.0 beta 4
- TypeScript for typesafe developing
- TailwindCSS for styling
- Shadcn as component base
- Prisma as ORM
- MongoDB as database
npm install
DATABASE_URL=
AUTH_SECRET=
GITHUB_CLIENT_ID==
GITHUB_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
RESEND_API_KEY=
NEXT_PUBLIC_APP_URL=
npx prisma generate
npx prisma db push
npm run dev
I'm looking forward to start exciting projects with you as a 100% remote developer.
You can find more informations about me and my tech stack on my GitHub page.