
For your reference you can download and use the project folder.
Set up a Postgres database and Prisma ORM to persist user data with a database adapter, configure JWT sessions, and run migrations to create user, account, session, and verification_token tables.
Learn how to implement a credentials provider in NextAuth v5 with email and password via the authorize function, and why building your own credential system is discouraged.
Create a multi-user organization model where users share data across the organization, with crud for todos and session updates exposing user and organization info.
Build an api endpoint in Next.js, implement authentication, and create a backdoor impersonation page that lets admin log in as a user using a credentials provider.
Conclude by building a Next.js 14 app with the app directory, server components, and auth js, implementing oauth, email, and jwt sessions in TypeScript-friendly way, backed by prisma and postgres.
Welcome to the complete soups to nuts comprehensive NextAuth course! I'm Sandeep, a seasoned software developer and together, we will delve into the ins and outs of user authentication while using the latest version, version 5 of NextAuth and latest version v14 of NextJs
We kick off by exploring how to establish OAuth flow for your application. Learn how to seamlessly integrate authentication from various providers such as Google, Github, Zoom, and more.
Next, we'll dive into the world of passwordless email authentication. Here we will be able to send user an email by using providers like Mailgun, sangria etc. and log them right in.
We will then setup custom username-password authentication system tailored to your specific needs.
From there we will move to configuring database adapters to persist all user information in your chosen database.
Next we will dive in to session management using JSON Web Tokens (JWT), and learn how to enhance them by putting custom information within the session.
While working on NextAuth we will also be learning how to intergrate it into NextJs v14 which utilizes the "app" structure. We will learn how to build public and protected routes, implementing authentication in the API layer, and creating a backdoor access for user impersonation.
I invite you to embark on this learning journey with me. Try out the course, and I look forward to engaging with you in our course chat.
Thank you for joining, and let's dive into the world of NextAuth together!