In this video you will learn how to use #nextjs next-auth to do authentication.
1. Email password sign in
2. Google sign in
3. Understanding the useSession hook
4. Global Auth component for easy redirects
5. Custom login form
6. Server side authentication in getServerSideProps
7. #api route #authentication
--------------------------------------------------------------------------
📦FREE $100 credit @Digital Ocean: https://m.do.co/c/3208f08b3324
--------------------------------------------------------------------------
Subscribe: https://www.youtube.com/c/yourstruly2...
--------------------------------------------------------------------------
💵Support the channel:
Paypal: https://www.paypal.me/trulymittal
Patreon: / trulymittal
--------------------------------------------------------------------------
0:00 Introduction
0:20 Setup
1:42 Google Provider for sign-in
2:26 Genrating ClientID and ClientSecret for Google Provider
5:30 Secret for Next auth
6:15 Session Provider
7:14 useSession hook
8:06 Sign-in page
9:11 Session object
10:07 Sign-out button
10:40 Custom sign-in button
12:09 Email Password sign-in
14:35 CredentialProvider for email signin
21:33 Custom sign-in form
23:32 Redirect on sign-in
24:28 Session in getServerSideProps — getServerSession
29:17 Global Server side session function
30:59 Protecting API routes
33:40 Protecting Pages using a Global component
41:43 Prisma adapter for storing users and accounts
48:09 User and Accounts relation in database
NextAuth: https://next-auth.js.org/
PrismaClient (Best practice): https://www.prisma.io/docs/guides/dat...
======================
✔ Other useful Playlists
======================
#RestAPI (#NodeJS and MongoDB): • REST API using NodeJS and MongoDB
#API Authentication using #JWT: • NodeJS API Authentication (JWT's)
#Firebase: • Firebase | Build a Notes App
Docker: • Docker
MongoDB: • Learn MongoDB in 50 minutes (Crash Co...
Html/Css/Js: • HTML / CSS / JS
Android: • Android
Challenges: • Challenges
#mafiacodes #yoursTRULY #tutorial #howto #nodejs #nextjs #next #react
Watch video Complete Next-auth tutorial, including global authenticated page component. online without registration, duration hours minute second in high quality. This video was added by user Mafia Codes 27 March 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,282 once and liked it 141 people.