Complete Next-auth tutorial, including global authenticated page component.
HTML-код
- Опубликовано: 3 июл 2024
- 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: m.do.co/c/3208f08b3324
--------------------------------------------------------------------------
Subscribe: ruclips.net/user/yourstruly2...
--------------------------------------------------------------------------
💵Support the channel:
Paypal: 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: next-auth.js.org/
PrismaClient (Best practice): www.prisma.io/docs/guides/dat...
======================
✔ Other useful Playlists
======================
#RestAPI (#NodeJS and MongoDB): • REST API using NodeJS ...
#API Authentication using #JWT: • NodeJS API Authenticat...
#Firebase: • Firebase | Build a Not...
Docker: • Docker
MongoDB: • Learn MongoDB in 50 mi...
Html/Css/Js: • HTML / CSS / JS
Android: • Android
Challenges: • Challenges
#mafiacodes #yoursTRULY #tutorial #howto #nodejs #nextjs #next #react
Truly Mittal! Glad you keep the content coming!
👍👍
Great tutorial Mafia, I was looking for this exact content on next auth, good explanation. kudos!!
This is in depth, clear tutorial about next auth❤
I can simply say, beautiful and perfect way of implementing next-auth. Thanks
I learned a lot from this tutorial. Thanks a lot and keep it up.
Implementing auth with custom backend with access and refresh token is such a hassle in nextjs. If you put tokens in local storage, it can only be used with csr not with SSR😢. Please consider making a tutorial around this topic
Hey! You are really doing great work. Can you create one Node microservice Series where web clients communicate with rest and service-to-service communicate through GRPC. Also How we can manage load scaling on API Gateway, Also make the read and write Service differently as an example. It will be helpful to everyone I guess. (With or WithOut Cloud support). But not using Lambda as you know it does everything for Us. haha.... but thank you so much keep growing :)
Ok, this very good , but very complicated !!! all i see is session , ...session, ...session... i gonna have to watch about 50 times 😂😂,.... But how to fetch data from database for a especific user ? cause this "Prisma" is very confusing !!! ...But i really apreciate, your effort for sharing your knowledge with us 😀👍
Better using ts, as you’ve a lot of js tutorials already
please make same for new next js
Surely
can you please help me in developing booking app in android with firebase ?
yes I can
@@mafiacodes can I male you
@@mafiacodes ,please make a series or give me any advice as i live in a remote place
way too complicated and fk using node js for this! i cba!