Next Auth Credentials Provider – Ultimate Guide
Learn how to use the credentials provider inside of Next Auth.
The credentials provider allows a user to login with a username/email and password.
We will be using MongoDB for the database, Prisma as the ORM, Next.js 13 as the framework and VSCode as the text editor.
Private 1 on 1 Help 👇
https://calendly.com/dabrettwestwood/30min
Join my FREE Discord to talk and network about web development! 👇
https://discord.gg/rKXNDnE32N
Time Stamps
0:00 Intro
1:05 Create the Catch All Next Auth […nextauth]
3:00 Define the Auth Options
4:06 Prisma Adapter
5:35 Prisma Schema
8:46 Create MongoDB Database
12:21 Define the Credentials Provider
14:42 Define other Auth Options
17:06 Exporting the […nextauth]
18:08 Clean up folders/files
19:21 Create Register Page
25:18 Create Register API Endpoint
32:11 Testing and debugging Register API
36:48 Create Login Page
39:52 Quickly Create Dashboard Page
40:15 Async Authorize Credentials Function
45:16 useSession Hook to check User Object
49:39 Outro