Complete Next-auth tutorial, including global authenticated page component.

  Рет қаралды 7,043

Mafia Codes

Mafia Codes

Күн бұрын

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: kzbin.info...
--------------------------------------------------------------------------
💵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

Пікірлер: 16
@franciskintungi
@franciskintungi Жыл бұрын
Great tutorial Mafia, I was looking for this exact content on next auth, good explanation. kudos!!
@7doors847
@7doors847 Жыл бұрын
Truly Mittal! Glad you keep the content coming! 👍👍
@manoj-k
@manoj-k Жыл бұрын
This is in depth, clear tutorial about next auth❤
@SuperShivammm
@SuperShivammm Жыл бұрын
I can simply say, beautiful and perfect way of implementing next-auth. Thanks
@benarisais1603
@benarisais1603 Жыл бұрын
I learned a lot from this tutorial. Thanks a lot and keep it up.
@saurabh9446
@saurabh9446 Жыл бұрын
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
@sourishdutta9600
@sourishdutta9600 Жыл бұрын
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 :)
@romimaximus
@romimaximus Жыл бұрын
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 😀👍
@raymondmichael4987
@raymondmichael4987 Жыл бұрын
Better using ts, as you’ve a lot of js tutorials already
@advaitias
@advaitias Жыл бұрын
can you please help me in developing booking app in android with firebase ?
@mafiacodes
@mafiacodes Жыл бұрын
yes I can
@advaitias
@advaitias Жыл бұрын
@@mafiacodes can I male you
@advaitias
@advaitias Жыл бұрын
@@mafiacodes ,please make a series or give me any advice as i live in a remote place
@tushaltak379
@tushaltak379 11 ай бұрын
please make same for new next js
@mafiacodes
@mafiacodes 11 ай бұрын
Surely
@JNET_Reloaded
@JNET_Reloaded Жыл бұрын
way too complicated and fk using node js for this! i cba!
Geofence API | Product | NextBillion.ai
1:04
NextBillionAI
Рет қаралды 194
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 179 МЛН
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 13 МЛН
I Built a Shelter House For myself and Сat🐱📦🏠
00:35
TooTool
Рет қаралды 30 МЛН
100❤️
00:20
Nonomen ノノメン
Рет қаралды 66 МЛН
Apple Is at Start of AI Supercycle, Wedbush's Ives Says
3:51
Bloomberg Television
Рет қаралды 653
SAND DEVIL 1-20 IS NOW EASY TO PROGRESS! | Raid: Shadow Legends
12:56
The Tech I'm Using in 2024
28:57
Ben Davis - Tech
Рет қаралды 6 М.
How 1,000 People Played Doom At The Same Time
15:42
ThePrimeagen
Рет қаралды 80 М.
React Query - Complete Tutorial
18:57
Cosden Solutions
Рет қаралды 98 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 179 МЛН