In this video, I will be showing you how to set up authentication in Next.js using Next-Auth v5 and postgres.
Code: https://github.com/JacksonZ03/authjs-youtube-tutorial
Chapters:
0:00 - Intro
0:27 - Creating a new Next.js project
2:51 - Difference between Next-Auth vs Auth.js
4:00 - Install the rest of the packages
5:04 - Setting up the postgres database
12:28 - Environment variables
20:49 - Creating a blank Home page
22:56 - Creating a blank Sign-in page and Dashboard page
27:40 - Creating the Sign in and sign out buttons
43:38 - Configuring NextAuth and adding functionality to buttons
59:10 - Setting up Email Magic Links
1:08:21 - Automatic database cleanup function
1:10:58 - Link/Unlink Google Account
1:18:56 - Displaying and changing username
1:25:24 - Role Based Access Control
Help this channel grow by supporting me on Patreon:
https://patreon.com/JacksonZheng
Check out my Essentials Blender add-on: https://blendermarket.com/products/essentials