Skip to content

Authentication with Auth.js (NextAuth) in Next.js 14 using App Router.

Notifications You must be signed in to change notification settings

Faruqt/next-14-authjs

Repository files navigation

🔐 Next.js 14 Authentication with Auth.js (NextAuth)

This project demonstrates how to integrate Auth.js (formerly NextAuth) with Next.js 14 App Router, including:

  • Credentials and Google provider authentication

  • Protected routes with middleware

  • Session management

  • Secure environment setup

🚀 Features

  • ✅ Next.js 14 App Router

  • ✅ Auth.js integration

  • ✅ Google OAuth and credentials provider

  • ✅ Secure API route protection

  • ✅ Session persistence using JWT

  • ✅ Environment-based configuration

📦 Technologies Used

  • Next.js 14

  • Auth.js (NextAuth)

  • React

  • Tailwind CSS

  • TypeScript

🛠️ Usage

✍️ This accompanying blog post will guide you on how to start up and use the application: How to integrate NextAuth with your Next.js application

About

Authentication with Auth.js (NextAuth) in Next.js 14 using App Router.

Resources

Stars

Watchers

Forks

Packages

No packages published