Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 1.61 KB

README.md

File metadata and controls

76 lines (49 loc) · 1.61 KB

image

Auth

A Reusable Authentication Codebase For Your Next(.js) Project

https://auth-1337.vercel.app/

Overview

A reusable Auth.JS 5.0.0 beta (former NextAuth) codebase with examples to implement in your Next.JS project.

Credits

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.

Features

  • 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

Used Tech Stack

  • 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

Getting Started

Installation

npm install

Create .env File

DATABASE_URL=

AUTH_SECRET=

GITHUB_CLIENT_ID==
GITHUB_CLIENT_SECRET=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

RESEND_API_KEY=

NEXT_PUBLIC_APP_URL=

Setup Prisma

npx prisma generate
npx prisma db push

Run Dev Environment

npm run dev

http://localhost:3000

About

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.