In this tutorial, we'll cover the complete process of integrating Drizzle ORM with NextAuth v5 in Next.js 14.
- Running the Project on Your Machine
- Demo of the Application
- Setting Up a Serverless PostgreSQL Database
- Creating the NextAuth SQL Tables with Drizzle ORM
- Creating the Database Schemas
- Connecting to the Serverless Database
- Performing the Database Migration and Synchronization
- Initializing NextAuth in the Next.js 14 Project
- Setting up Credentials Authentication with NextAuth
- Setting up Google and GitHub OAuth with NextAuth
- Retrieving the Session Data in Different Locations
- In a React Server Component
- In a Next.js Route File
- In a React Client Component
- Modifying the Session Data and JWT Payload
- Protecting Routes in Different Locations
- In a Next.js Route File
- In a React Server Component
- In a React Client Component
- In a Next.js Middleware File
- Conclusion
Read the entire article here: https://codevoweb.com/setting-up-drizzle-orm-with-nextauth-in-nextjs-14/