It's not 1999 anymore, no need to roll your own Auth solution - in about 5 lines Auth.js lets you hook any provider and connect your user's data to your Xata database.
In this video we are using GitHub as a provider and Next.js (with App directory) as our stack.
00:00 Introduction
00:10 Setup Next.js App
00:38 Initial Modifications
01:00 Code Push
01:09 Setup Zeta Adapter
02:19 Create Database
02:41 Connect to Database
03:20 Configure Codegen
03:53 Restart Server
04:05 Next Auth API Route
04:40 GitHub Provider
05:04 Xata Database Connection
05:51 Get GitHub Credentials
06:55 Root Page Components
07:52 Create Login Button
08:47 Test Login Process
08:59 Show User Details
09:10 Logout Button
10:10 Conclusion
🐙 Source code: https://github.com/atilafassina/authj...