Тёмный

JWT Authentication in NodeJS 

Piyush Garg
Подписаться 184 тыс.
Просмотров 114 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 118   
@tfnt3839
@tfnt3839 Год назад
I have seen the playlist of million subscriptions of the channel. but your teaching style and explanation is great.
@ctauheedpasha1527
@ctauheedpasha1527 12 дней назад
the thing is the way you make us understand the concept are so good. In previous video you thought how to implement cookies but i never got time to watch the whole video but i created a logic by myself to delete the cookie id when a user clicks logout such that it redirects me to the login page again. Thank you so much and keep up the good work!!
@Javedboqo1
@Javedboqo1 11 месяцев назад
All of videos from this guy are very useful and amazing
@dhruvsolanki4473
@dhruvsolanki4473 2 месяца назад
Stateless vs Stateful understood because of you, thanks!
@gohit8703
@gohit8703 Месяц назад
thanku piyush you made my journey possible to project building
@weforyouweb1165
@weforyouweb1165 Год назад
You are gem 🎉 You have very very deep knowledge of all things ❤🎉🎉
@knightcore4062
@knightcore4062 2 месяца назад
finally understand sessions cookies and jwt...thank you sirji!!!!🙏🙏🙏🙏
@namannema3349
@namannema3349 6 месяцев назад
i like the way you explain by giving examples and your explanations are very user friendly
@joban_dhillonn
@joban_dhillonn 10 месяцев назад
bahot badiya exaple de kar samajiya sir apne secret key bhot confush tha thankuu
@banothutharun2743
@banothutharun2743 Месяц назад
wow excellent explaination..thank you brother for this playlist 😊
@Shashwat73557
@Shashwat73557 День назад
10:38 you changed the token. the email was changed, the new token contains Tcf90 at last but at 10:39 (HXfCY at last) there is a cut in video where you changed it, i was getting the glitch and sure you too but you not explained that in video and directly changed something.
@webdeveloper3529
@webdeveloper3529 Год назад
❤ sir your lectures are blessings for me... plz cover advanced nodejs caching, threading, etc...
@piyushgargdev
@piyushgargdev Год назад
Sure, Thanks :)
@harshrajsinha012
@harshrajsinha012 8 месяцев назад
i'm getting return done(new JsonWebTokenError('jwt malformed')); JsonWebTokenError: jwt malformed@@piyushgargdev this error
@AfhamAdian
@AfhamAdian 9 месяцев назад
this is the best on internet
@satyampal7235
@satyampal7235 7 месяцев назад
Awesome explanation bhai 👌
@amrExplore
@amrExplore 11 месяцев назад
Very nicely explained Piyush. ! question though, in case of refresh token does the secret on the server changes since the payload information would remain the same ? Wonderful JWT explnation
@Black-Curtains
@Black-Curtains Год назад
Brother! as we are storing tokens with cookies. Someone can copy that token and log in, as you already demonstrated. Is it a secure way? कृपया मार्गदर्शन करें..
@piyushgargdev
@piyushgargdev Год назад
Good Point, I'll surely clear your doubt in next video ✨
@PubG-dl5eh
@PubG-dl5eh Год назад
Great video sir👍
@Shashwat73557
@Shashwat73557 День назад
There is no login if you changed the email using secret password also. at 10:38 to 10:39 even he can't login. there is a cut in the video from 10:38 to 10:39 where somehow he got loggedIn,the funny thing is at 10:38 the token he copied frow jwt is different from 10:39 (where there is a cutshot in the video) and he got login.
@AmitSingh-nq6bp
@AmitSingh-nq6bp 2 месяца назад
I really like his vs code theme , did anyone know the name of it ?
@bm9code
@bm9code 10 месяцев назад
this is only video in which i saw that the use secret key in jwt ♥ thanks ♥
@vijenderkumar3034
@vijenderkumar3034 Год назад
Nice video
@mma-dost
@mma-dost Год назад
Great video bhaiya there is something csrf is jwt secure with that hack ?
@piyushgargdev
@piyushgargdev Год назад
Added to my list, will surely make a video on it
@ibntofajjal
@ibntofajjal Год назад
Keep Going Bro. You Doing Well
@shubhamgupta-bl1tr
@shubhamgupta-bl1tr Год назад
But if we store sessions in database tab to problem ni hogi na in statefull
@Ayush37262
@Ayush37262 9 месяцев назад
He solved your doubt in the next video!!!
@pankaj8876
@pankaj8876 Год назад
Great explanation! 👌
@100DDC
@100DDC 10 месяцев назад
wow, awesome bro
@ar.survivalcraft
@ar.survivalcraft 3 месяца назад
Bhaiya jab tokens ko cookies me store kiya ho to react js ke routes ko kaise protect kare based on presence of token in cookie?
@iamakashkumarram
@iamakashkumarram Год назад
JWT Authentication basic to Advance full cover karado sir.
@satyam94163
@satyam94163 Год назад
yes plz
@piyushgargdev
@piyushgargdev Год назад
Okay sure
@mubasshirkhan1370
@mubasshirkhan1370 9 месяцев назад
Thank you bhai...... ❤🧡💛💚
@seemakhan-jx8lp
@seemakhan-jx8lp 18 дней назад
Assalamo Alikum Sir Sir kiya asa office hai jo urdu mai interview ly our office waly urdu bholy muje typescript react javascript and node.js and exprees ati sirf language ka issues hai english ki samj ati par mai bol nhi sakti
@fatimaiqra2169
@fatimaiqra2169 Месяц назад
Thanks
@lovelymusic3549
@lovelymusic3549 Год назад
Sir when you are starting a complete react JS course basic to advance any idea sir?
@life-lessonn.
@life-lessonn. 10 месяцев назад
hello big brother what is the difference between jwt token vs express-session ?
@NKAnimations-mm2pp
@NKAnimations-mm2pp 4 месяца назад
Sir I really like your videos but there are 2 problems which I am facing: 1. Your authentication videos are dependent on URLGeneration videos. 2. If someone face any error in the URL at any point he wont be able to continue until that error gets resolved. 3. Solution : if you could provide the source code then it would be easier for us to resolve our errors. 4. Solution : If you could make such videos which are not dependent on each other then it would be easier for us to understand each concept from the Scratch
@OTTStar334
@OTTStar334 3 месяца назад
source code are in the description
@ET21BTIT051_KRUSHANGRANGOONWAL
@ET21BTIT051_KRUSHANGRANGOONWAL 2 месяца назад
@@OTTStar334 where is it ?
@shi-nee7966
@shi-nee7966 Год назад
sir i am getting error "jwt malformed" i tried matching codes, also searched on stackoverflow but just couldnt solve the error...please help if you know...i will update if i get the solutain
@dishantsingh5790
@dishantsingh5790 Год назад
i got the same error just now, restart ur server then dont directly go to "/" route , firstly clear cookie from Browser then go to the login page , login as user , then everythng will work fine
@daniyalghani4857
@daniyalghani4857 Год назад
i got the same error thank you brother @@dishantsingh5790
@harshrajsinha012
@harshrajsinha012 8 месяцев назад
it's not working bro @@dishantsingh5790
@usmanmunir5241
@usmanmunir5241 8 месяцев назад
I am still getting error ​@@dishantsingh5790
@usmanmunir5241
@usmanmunir5241 8 месяцев назад
How you resolve this error?? @shi-nee7966
@shivaverma85
@shivaverma85 7 месяцев назад
I dont know why everytime its giving me error as jwt malformed but i am writing the same code as you have written .. I have seen your all videos upto authentication and everything is fine but i dont know why as soon as i am using jwt its not working . i am working on it to find error from past 2 hours but its not working please help
@rakshitgupta1771
@rakshitgupta1771 6 месяцев назад
same problem aari hai bhai mujhe bhi solve hui kya???
@YashJain-hd2rs
@YashJain-hd2rs 6 месяцев назад
Same bro
@niyafofficial1476
@niyafofficial1476 3 месяца назад
From 2days
@avfitnes96
@avfitnes96 2 месяца назад
Thx sir❤❤
@sourabhgarg2890
@sourabhgarg2890 Месяц назад
bro u teaching backend or hacking?
@pallabdandapat1866
@pallabdandapat1866 5 месяцев назад
sir getting the below error : C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\jsonwebtoken\verify.js:70 return done(new JsonWebTokenError('jwt malformed')); ^ JsonWebTokenError: jwt malformed at module.exports [as verify] (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\jsonwebtoken\verify.js:70:17) at getUser (C:\Users\palla\Downloads\short-url-node\short-url-node\service\auth.js:13:16) at checkAuth (C:\Users\palla\Downloads\short-url-node\short-url-node\middlewares\auth.js:15:18) at Layer.handle [as handle_request] (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\express\lib outer\layer.js:95:5) at trim_prefix (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\express\lib outer\index.js:328:13) at C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\express\lib outer\index.js:286:9 at Function.process_params (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\express\lib outer\index.js:346:12) at next (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\express\lib outer\index.js:280:10) at cookieParser (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\cookie-parser\index.js:71:5) at Layer.handle [as handle_request] (C:\Users\palla\Downloads\short-url-node\short-url-node ode_modules\express\lib outer\layer.js:95:5) Node.js v20.6.1 [nodemon] app crashed - waiting for file changes before starting...
@pratyushpragyey7002
@pratyushpragyey7002 5 месяцев назад
function getUser(token){ if(!token) return null; try { return jwt.verify(token ,secret); } catch (error) { return null; } } use this function instead of what you've written
@pallabdandapat1866
@pallabdandapat1866 5 месяцев назад
@@pratyushpragyey7002 yes sir , i have done the same thing , thank you.
@mayanksinha1883
@mayanksinha1883 5 месяцев назад
@@pratyushpragyey7002 thanks mannn
@SulavGhimireeee
@SulavGhimireeee 9 месяцев назад
Thanks bro
@ShashankGrade-xk9dc
@ShashankGrade-xk9dc 2 месяца назад
when i replace my token with wrong one the app remain run
@as_if
@as_if 6 месяцев назад
4:30 difference between this token and the UID
@abhayyraz
@abhayyraz 3 месяца назад
Too Good
@ctet5470
@ctet5470 Год назад
Where we are calling getUser function?
@codingwave56
@codingwave56 10 месяцев назад
Hmne Information (Object) ko JWT ki madad se bina Secret key bhi generate kar diya to ye secret key kiss kam ki? Plz Reply Sir...
@utube6044
@utube6044 10 месяцев назад
kaha pe?
@varunchakraborty6020
@varunchakraborty6020 9 месяцев назад
I don't know if you got the soln or no, but Secret key token me changes krne ke liye h n ki use read krne ke liye
@codingwave56
@codingwave56 9 месяцев назад
@@varunchakraborty6020 Yes, Got it 👍🏻 Thanks
@utube6044
@utube6044 9 месяцев назад
@@varunchakraborty6020 matlab ki dekhne k liye ki ye token meri secret key se bana hai ki nai?
@varunchakraborty6020
@varunchakraborty6020 9 месяцев назад
@@utube6044 hn mtlb agr kisi aur ne changes krdiya token me, to mai verify krskta hu, ki final token mere secret key se bni h ya nhi
@najmulhasan5997
@najmulhasan5997 10 месяцев назад
thanks
@mayanksinha1883
@mayanksinha1883 5 месяцев назад
nodejs\urlshortener\service\auth.js:8 _id: user._id, ^ TypeError: Cannot read properties of undefined (reading '_id')
@CodeForgePro
@CodeForgePro Месяц назад
but somewone steal the cookie and try to login in their system can we stop this
@Atul_Thakre30
@Atul_Thakre30 20 дней назад
That's why it is not a good way
@deepanshuaggarwal5181
@deepanshuaggarwal5181 Год назад
how on changing payload with wrong email and right secret key, we logged in at 10:40
@Ayush37262
@Ayush37262 9 месяцев назад
Did you got the answer?? I think maybe because we have already entered the correct email and password in the beginning...
@MrBlazzerBoy
@MrBlazzerBoy 9 месяцев назад
Please mention it's Hindi in title.
@20_omkar_kadu57
@20_omkar_kadu57 Год назад
jwt itma hi hota he ya aur bhi kuch he
@mdebrahim2164
@mdebrahim2164 11 месяцев назад
helpfull
@dhruvbandi6633
@dhruvbandi6633 11 месяцев назад
bro where is the code
@AtharvJoshi-jc7ow
@AtharvJoshi-jc7ow 4 месяца назад
then why the heck IRCTC uses session😂 it loggs you out at the last second of your attempt to book tatkal ticket💩
@anandshete9170
@anandshete9170 4 месяца назад
bhai ham agar hot to ham khud hi acche khase website bana lete yarr inko kon bataye abb saste saste developers use kiye hai inhone
@sudhanshugautam425
@sudhanshugautam425 11 месяцев назад
let say you want to make this project open source, but in the backend itself you shared the secret key and using that anyone can get make fake token????
@Ayush37262
@Ayush37262 9 месяцев назад
I think we will store the secret key in the .env file
@ChandransuSekharSatapathy
@ChandransuSekharSatapathy 6 месяцев назад
someone has its source code
@nithenbains
@nithenbains 3 месяца назад
explaination is top-notch but appke voice tone like a little child is speaks
@rishabhraj8233
@rishabhraj8233 10 месяцев назад
hey I am here on 1st jan anybody else?
@chrisjordan5849
@chrisjordan5849 3 месяца назад
Sir ji ek hi video me pura samjha diya karo na bar bar ja ke dusri video pehle dekho
@hetpatel9503
@hetpatel9503 Год назад
👌
@ShivendraPratap524
@ShivendraPratap524 Год назад
What next?????
@piyushgargdev
@piyushgargdev Год назад
We will cover advance concepts while building projects, No video for today!
@ShivendraPratap524
@ShivendraPratap524 Год назад
@@piyushgargdev matlab ab projects hi projects ayenge
@ShivendraPratap524
@ShivendraPratap524 Год назад
One more request react ke sath integrate karle bhi ek project, fir chain se jinda rahenge
@ShivendraPratap524
@ShivendraPratap524 Год назад
@@piyushgargdev aur haa videos ki continuity yahi rakhiyega sir
@hemobhai1
@hemobhai1 8 месяцев назад
Ek hi video me bana diya Karo na warna bataya hi mat karo pahle ye dekho tab wo dekho aadmi yaha sikhne aata hai ki tumlog ka views badhane
@mujibulhaquetanim
@mujibulhaquetanim 8 месяцев назад
Bhai, have some patience. it is not a paid course.
@Flux-e4y
@Flux-e4y 8 месяцев назад
same bro mujhe bhi bhout gussa aata hai
@proudtobeindian27
@proudtobeindian27 7 месяцев назад
Bhai mat aaya kar ehsaan na kar us par, ek to free main pada ra upar se tu attitude dikha ra, scroll kar aur dusare ko dekh na
@shivajikapale2336
@shivajikapale2336 6 месяцев назад
Bhai bahut badiya padha raha hai banda free mai... Pura videos dekho nahi to kuch mat dekho
@quick-bytes
@quick-bytes 5 месяцев назад
Separate video better hai warna bohot long ho jata woh video na itna tum ya koi bhi samaj kr digest kr pata atleast iska part 1 video khtm hua hoga tb logo ne practice krne ka try kra hoga Netflix pr binge watch krne nahi aaye ho sikhne aaye ho tum yaha pr 🙂
Далее
What are Cookies in NodeJS?
30:35
Просмотров 69 тыс.
Node Auth Tutorial (JWT) #1 - Intro & Setup
15:30
Просмотров 273 тыс.
What Is JWT and Why Should You Use JWT
14:53
Просмотров 1,2 млн
Building Node.js Authentication from Scratch
39:09
Просмотров 176 тыс.
FastAPI JWT Tutorial | How to add User Authentication
20:27
JWT Authentication Tutorial - Node.js
27:36
Просмотров 1 млн
What is REST API?
15:41
Просмотров 127 тыс.
Server Side Rendering with EJS and Node.JS
25:24
Просмотров 89 тыс.