Thanks to Hitesh Sir, I overcame challenges at my tier 3 college, only because of him, I had no guidance earlier but this man, is the greatest teacher of all time. His teaching style is a game-changer. I've created projects, gained confidence, and salute him. May his influence endure for centuries. Hats off, Sir!
@anonyone88349 ай бұрын
i am happy ki jo bhi aapne mistakes batayi meri unme se ek bhi nhi thi :)
@drlovephukn10 ай бұрын
Meri Logic bohot Improve ho gayi hain iss series follow karne ke bad. many many thank you from bottom of my heart .....
@sumangalammishrashines64123 ай бұрын
can you explain line no 203 in user.controller.js ? if user is being find out on the basis of decoded token and that decoded token comes from incomingRefreshToken then it finally means user indirectly has been derived from incomingRefreshToken. so what is the need to check if(incomingRefreshToken !== user?.refreshToken) because both refresh token have been derived from user only and hence they both are one in every case.
@igssr02 ай бұрын
I have a doubt can any one clarify if the access token is expired we are hitting a route to generate new one but refresh token has more live time than access why again generating new refresh and access both can't we generate only access tokens until refresh expires
@sumangalammishrashines64122 ай бұрын
@@igssr0 so that duration of refresh token can also long last. Like if it for 2 days then you hit for new access token on 2nd day then it will create new refresh token as well which will continue for another two days.
@faizansiddique2447Ай бұрын
@@igssr0 this is because to improve security as well as if refresh token also expire we can't generate new access token so we are doing to avoid these problems and remember this is also important for security purposes
@TenzDelek10 ай бұрын
i have been following your series from the javascript ,react and now this.. and i can now confidently say that now i know what I am coding, back then use to watch so much of tutorials just to forget it the next day.. but yours teaching approach tends to make me understand why this things are being used from a simple concept of cors to the advance. you have made me understand the core of it. I hope you keep on teaching such valuable resources..
@saadatbadgujar9 ай бұрын
Making a separate video for this was actually great, awesome!
@sufiyanahmad1603 Жыл бұрын
Guruji aapka bahot sukriya, aaysa course quality duniya me kahi or exist hi nhi krta ❤❤❤❤
@harshit85259 ай бұрын
Access points are the key which a suer generated post login . This is generally of shorted duration . When the session is complete , now user has two options one is to enter the password again and other one is to hit an api end point to refresh token . From both the two, second one is more useful since it is long duration key and can bee refreshed to increase the session and user had not to enter the password manually AND LOVE TO HITESH SIR 👌👌👌👌❤❤
@igssr02 ай бұрын
I have a doubt can any one clarify if the access token is expired we are hitting a route to generate new one but refresh token has more live time than access why again generating new refresh and access both can't we generate only access tokens until refresh expires
@meet_rakholiya11 ай бұрын
its a complete package of backend. any course can not have this type of quality. thank you for this sir.
@ayushyajaiswal6857 Жыл бұрын
Thank you soo much sir, I'm currently working as a frontend dev in my org and got the opportunity in the current project to almost handle everything be it a frontend, backend or db reports. I was able to understand the things but in backend I do get few dobuts in multiple places while developing the new functionality. But since we've little tight schedules and project is also live so have to handle bugs as well so mostly I fail to clear all my doubts and just wrote the things just to make things work. But after the end of this 16th video I'm understanding most of the things and able to work in backend as well now as easily as I work in frontend. Thanks alot sir for your guidance.
@adarshjhaxiif-1289 Жыл бұрын
Right now, you're heartbeat of every 2nd-3rd year student. Hopefully we will complete this project. Thanks a lot sir
@vishal-shinde9 ай бұрын
no, for everybody knows trying to be a developer.
@Nitesh_Saini_ Жыл бұрын
Guruji Dil se sukriya 😅 .iska bahut time se intezar tha😊
@chaiaurcode Жыл бұрын
Share zrur krna
@AbdulRehman-u2x5nАй бұрын
Sir with much RESPECT, you are an amazing teacher and personality. SHUKRIYA itna achay parhanay k liay and SHUKRIYA itna acha (quality content) prhanay k liay.❤
@vaibhavchopra5297 Жыл бұрын
Great sir 😊😊. Please continue this series as fast as possible. I have also shared on LinkedIn and to my friends as well. ❤❤❤ Best teacher....🎉❤
@boomaboom6458 Жыл бұрын
HItesh sir is mentor and true inspiration for me i come from that background that i can't even finance my livehood and i am studying my diploma in electrical and electronics i watch hitesh sir videos in my 2nd hand broken phone and visit the cyber shop monthly twice and make notes in my notebook and code the project and learning full stack development from chai aur code may this channel growth increase exponentially in 2024 because for sure if he wasn't there i would not be able to learn this much insights of tech thank you very much sir for sure .... bus aj tak kabi kisi kay saat apnay internal matter share nhi kiye hai aj karnay ka man kara thanks a lot hitesh sir bus aur kya chai ☕ piyo aur 😭😭😭😭 chil karo
@ManishM-b7i Жыл бұрын
hope this might help u : During login we generate 2 tokens 1) access-token 2) refresh token we save refresh-token in DB and set access-token and refresh-token cookie in chrome access-token is for short time and refresh-token is for long time when user access-token is expired it send refresh token to Back-end Back-end checks if DB refresh-token and user refresh-token is same or not if same it generate both token again and repeat process of saving RT in Db and set cookie with RT and AT
@EmTom9952 ай бұрын
@@ahmedsnippet Bhai apne mongoose model wala video nhi dekha shayad usme hi define kiya hai methods schema banene ke baad
@MeerUzairWasHere Жыл бұрын
Sir, we can optimize this by implementing middleware. By utilizing middleware, we can exclude the endpoint and efficiently manage the process of obtaining both cookies and updating the access token through the refresh token. This not only streamlines the workflow for the front-end developer but also ensures a smoother experience by handling these tasks seamlessly in the backend.
@kunaldhuria393519 күн бұрын
aisa hi hona chaiye tha thoda unnecessary complicate ho gya
@Bakhudiansochan29 күн бұрын
Kamal he AAP ese parhte hn jese hamari confusion hum se sun k clear kr the hon
@fabulousgamer2293 Жыл бұрын
Lovinggg the seriess alwayss❤❤❤.. I am a tier 3 college student.. And it really helps me to know how a project is really made and I am going through it and also enjoying😊
@mohammad-aman110511 ай бұрын
Sir, Thank you ki aapne video ko 2 part me rakha. Isme concept clear hogai meri.
@soumyajitnaskar8300 Жыл бұрын
Access Token - Short lived, not stored in db Refresh Token - Long lived, stored in db When access token expires, the frontend sends the refresh token to the backend to validate user (login), once again.
@ShuklaManeesh-qv1yl7 ай бұрын
can you please tell me how can i hit that endpoint of refreshToken in frontend? like in what section of frontend i should make a call to that RESTAPI of refreshToken?
@ShreyanshGajjar-k1s7 ай бұрын
I think in third line u meant access token instead of refresh token because, when access token expires how can frontend send refresh token which is in backend send to backend??
@maneeshshukla98857 ай бұрын
@@ShreyanshGajjar-k1s ig when access token expires after a certain period of time, we have to hit the endpoint of API which will match our refresh token with the refresh token stored on db and again generate a new access and refresh token.
@Rahul-jo1mp7 ай бұрын
@@ShreyanshGajjar-k1s because accessToken is already saved in cookies of front end . Whe front end send cookies to server then server will check incoming refreshtoken with refresh token stored in database
@Rahul-jo1mp7 ай бұрын
i also have same question if refresh token is also new generated with acess token then whats the point of givng longer expiry time to refresh token
@zia-kayani Жыл бұрын
thanks sir , quality + teaching style is unparalleled .
@ravisingh5906 Жыл бұрын
sir please continue this series , i am studying very seriously
@RamSinghPatel-vs6ln3 ай бұрын
Thanks sir now you are one of the greatest teacher in you tube community and this course is much more better than paid courses 🙏🙏🙏 This course in very enjoyable learning with chai and code
@mdrafehqureshi54096 ай бұрын
At 22:07 Only generate new access token don't generate refresh token again as it is already long lived and while sending back cookies send new access token and old incoming refresh token. Still if you want to generate both the tokens and send them back to the frontend then make sure that you save the new refresh token in the database . Otherwise there is no use of keeping long lived refresh token. I think sir might have missed this point while recording.
@vishakhakhanna81154 ай бұрын
I have a doubt. We didn't updated the refresh token and access token in DB, this might cause error . Correct me if am wrong.
@mdrafehqureshi54094 ай бұрын
@@vishakhakhanna8115 we will update the refresh token in DB if and only if both refresh and access token have expired. If only acces token has expired then in the backend we will check whether the refresh token, coming from the frontend is same as the refresh token in the DB and has not expired, then we only generate new access token in the backend and send it to frontend. Note that in DB we only store refresh token and not access token.
@husain62133 ай бұрын
You are wrong here. Because when we call generateAccessTokenAndGenerateRefreshToken() .there is already code for saving refresh token in DB. so whenever we call generateAccessTokenAndGenerateRefreshToken() it will automatically save new refresh token in DB
@vishakhakhanna81153 ай бұрын
@@husain6213 Thanks, got it!
@satish_dewasi2 ай бұрын
@@husain6213 True , But what point of generating refresh token again with access token.
@Ansh0R Жыл бұрын
14:32 Sir in user.controllers.js in refreshAccessToken function in line no. 188. you miss to put "!" In if condition- Mistake - If (incomingRefreshToken) { Throw new ApiError(401, "unauthorized request") ) Fix - If (!incomingRefreshToken) { Throw new ApiError(401, "unauthorized request") ) This is fixed by sir
@vishal-shinde9 ай бұрын
thanks for the video. refresh token ko samajna pehle difficult tha, now I have understood.
@cyb3rjunky60911 ай бұрын
subscribers are increasing around 1K per day 😮😮
@Kattameedivishnuvardhan-s2h Жыл бұрын
thanks sir for your hardwork for the students to providing the quality and production leevel content
@mdprogrammer6146 Жыл бұрын
Hitesh Sir, when we are using asynchandler() which already have try and catch block then why we are using another try and catch block inside refreshAccessToken() function when it is also wrapped with asynchandler() func??
@factolava89467 ай бұрын
Same doubt bro🤝
@sagaryenkure5112 Жыл бұрын
I remember when I was trying to learn redux and other YT videos are very confusing their ,then the video on redux of hitesh sir came then the concept of redux became very easy for me
@len57559 ай бұрын
I am following your videos on this channel and your English channel now Not only I have learned JavaScript (in depth), React and now back-end, I have also learned to debug my code properly by reading the errors calmly. I used to get anxious & frustrated, then quit projects just because of that, thanks for changing my habits
@najmulhc Жыл бұрын
Am lovin the series. learning backend from an industry standerd level.
@vivekbhatt393211 ай бұрын
Awesome content, really like how the things are connected and dependent on each other in backend. Frontend + Backend = 🔥🔥. Thankyou sir for such content.
@devmangrani1482 Жыл бұрын
Sir you already finish this series But I am learning from it now Thank You so much
@haseebhijazi62957 ай бұрын
Kudos Hitesh! A great series for backend for developers who lack professional experience. One of my friends recommended this series to me for my Full-stack project and I must say you have put a lot of hard work in making this amazing series. Even though, I am using MySQL as the backend for my project, the series was still helpful for code style and logic building. I never felt for watching any other tutorial besides the available docs of the technologies which I used. While testing my logout route was throwing errors as it could not fetch any token. Upon inspecting, I saw that I was not receiving cookies in login route, which was inturn causing issues with the logout route. So, I commented out the secure option in the "cookie options". And Voila! It worked. Shared it as someone struggling with same issue might find it helpful. Thanks Hitesh!
@shahhussain567 ай бұрын
Itne detailed me koi nahi padhata h even paid course me bhi nahi koi padhata sir. Hats off for your hardwork❤ lots of support.
@zeeshankhan-yc4oy Жыл бұрын
series bohat pasand arhi he. thank you sir!
@Codewithrasheed Жыл бұрын
thanks sir , quality + teaching style is unparalleled . ❤
@arifsaleem-73778 ай бұрын
thanks sir , quality + teaching style is unparalleled .
@ShubhankarSharma-vr6zg Жыл бұрын
Thank you sir for providing a clarity, the difference is cleared now
@sanchit_H11 ай бұрын
This Series helped me a lot with errors when earlier I use to get error I was scared of them didn't know how to handle them and even how to approach an error. Today while I was checking Login page I got couple of error first was password was incorrect, checked my DB it was not encrypting the password went through all the code and didn't wrote an await in a single line that caused the error. few others were I wrote user instead of User when trying to find the id, thanks a lot For building my confidence with your explanation and deep dive into topics
@devanand4269 Жыл бұрын
Thank you sir ache se samjh agya refresh and access token
@theshubhagrwl Жыл бұрын
Kuch mahine pahale mai Linkedin ki api se kuch develop kar raha tha, usme bhi kuch refresh aur access token ka scene tha. Access token to pata tha but ye refresh token wala concept mujhe to bilkul samj nahi aaya tha tab. Ye video dekhne ke baad aur khud code karne ke baad clear hua hai concept 😌
@Ofcl-Javed11 ай бұрын
First I watched the videos learns a bit this and that, then I code without video sometimes refer to github repo and do it in typescript then now rewatching to look if I've missed something else or any assignment Lovely series sir While doing this I already got so many project ideas and this series will be base of all that
@nehabansal37010 ай бұрын
Thanks Hitesh Sir, I am here to refresh my concepts for Production based projects. I am regaining my confidence back. Thanks a lot.
@yogesh_prakhar11 ай бұрын
Thank you Hitesh sir for this series , the knowledge you are providing us is very precious (Gulabi Dil)
@lalmanthakur7899 Жыл бұрын
great teacher comes with great videos 😊
@tuhinghosh97375 ай бұрын
Now I can find out the solution of the errors step by step .. thank you so much sir ❤️
@pococopo253811 ай бұрын
i had spend 3 hours on previous video just to figure out how everything was working like cookies , accessToken, refreshToken , etc how a refresh token added to our userInfo documents when it logs in how it removes the refreshToken property from the document when it logs out how if we didn't give authorization headers from postman it was still logging out (this thing confused me for a long time then i did some Console.log all over our code and after that i figured out that postman was also sending the cookies with out post logout request... i guess) but afterall it was really fun This whole series is Amazing Thank You Hitesh Sir
@sherebanoburhani8939 Жыл бұрын
Right now I completed hitesh sir JavaScript series and starting react❤
@parvejkhan4512 Жыл бұрын
I really follow your video and implement in my day to day its very helpful for me to write clean and production ready code Your are really mentor my coding jauarny❤❤❤🎉
@ridamsinghal1073 Жыл бұрын
Best video explaining about the refresh token and access token
@kirankuyate6056 Жыл бұрын
great videos sir please make this series complete there will be non of other videos compare with this series at all Time Top no matter people is likeing or sharing or not but getting involved in it that is most important impact of this videos.. Make and completed it Love from Kiran to Chai aur COde 💖💖
@shubhamgurjar912 Жыл бұрын
I was eagerly Waiting for Part 2 of Backend series now finally it's came❤😊.
@bhaskargautamdivcroll4607 Жыл бұрын
sir your teaching skills is next level please don't stop keep moving forward and continue this series i learned Node js from this course THANK U SO MUCH SIR >>>>>
@AyushGupta-xq8fe Жыл бұрын
One of the best playlists on javascript backend
@chaiaurcode Жыл бұрын
Thanks
@rakeshbhetariya Жыл бұрын
The video may be brief, but its content is impactful and truly impressive.
@RoshaniWankhede-rf4rw2 ай бұрын
Best video on this topic...🤗
@mohitwadhwani6024 Жыл бұрын
First of All Thanks Hitesh Sir, and I just want to say that, the ease with which you explain the concepts that too in great detail is just amazing.
@sarthaksaraf66409 ай бұрын
first time solved bug without taking help of chatgpt and stack overflow on access token and refresh token mene arrow function use kara tha jabki normal function use karna tha due to problem with this keyword uski wajah se token generate nhi ho rha tha.. all thanks to you sir, i usually dont comment but aapko salute hai!!!
@monikabasene29088 ай бұрын
hey i am facing the same error
@munna5553 Жыл бұрын
Wooow great teacher comes with great videos 😊
@vivekkrishan219811 ай бұрын
Backend seems to be so easy just because of you only. Before your videos, our opinion about backend was "it a very complex tech and it need a lot of complex algos for doing every tasks" and now our opinion is " backend is just a normal logic with some js packages and a bit of production grade standerds"
@dheerajpali97466 ай бұрын
Thank you so much Hitesh sir, for making such an amazing series.
@yudhyasva-rv23 күн бұрын
complexity me hi mazzaaaa hai. 😍😍😍😍😍😍
@SC000 Жыл бұрын
Great serese sir, please continue rakhiye ise...bech me stop mat kijiye....😢
@mohsinzia85664 ай бұрын
I am learning so much from this series thank you hitesh sir!!!
@aritra2374 Жыл бұрын
keep posting videos quickly sir its an amazing series i follow every thing the first day only
@chaiaurcode Жыл бұрын
Jldi to humse nhi ho paata, apna safar relax hoke hi chalta h
@developer_dhanji7 ай бұрын
😇 mindBlowing Hitesh sir
@MuhammadYasir-cl4jp Жыл бұрын
Sir Thank you so much for bringing this high quality content. Please sir continue it 🥰🥰🥰
@armanali-xq1el Жыл бұрын
it really helps me to know how a project is really made and I am going through it and also enjoying😊
@me_vip_000711 ай бұрын
Thank u so much for providing us in depth knowledge 🙏🙏🙏🙏
@PriyaSharma-v8u4 ай бұрын
this is unbelievable content!
@kushalbhargava8212 Жыл бұрын
Sir badiya series hai Continue karte rahiye sir...
@lakshmikanthmhetre28336 ай бұрын
Thank you Sir ji. Love your teaching. Apka aashirwad rahe hum chaatron ke sath.
@huamanraj Жыл бұрын
sir is more sucessful still more hardworking than me!!😊😊
@_sahildahat_ Жыл бұрын
This content is awesome as always! Sir your teaching style is great!
@shashwatpal4217 Жыл бұрын
thank you for the separate access toekn and refresh token video
@pratyushsharma59634 ай бұрын
Awesome Playlist Sir, Thank you !!
@LintaRabail7 ай бұрын
I learned alot from this series worth watching👍
@harshtiwari3928 Жыл бұрын
You explained it so simply, lot to learn from you apart from your coding
@Dev-Phantom8 ай бұрын
ultra Helpful lecture. best lecture
@supersection Жыл бұрын
Sir, this series is just mind blowing and totally love your approach to teach us every topic❤... Please continue ki jiyega iss series ko end tak, bohat helpful hai, aur maza aata hai sikhne mein aapke sath
@KruelGodGaming4 ай бұрын
when hitesh bhai said sabko kuch nahi aata he sab idahr udhar se dekh ke kar rahe he thoda logic use kar rahe he nahi aaraha he to fhirse check kar rhae he... this line gave me confidence, as I am started to feel like in all this technology advancement I am still, in stone age 😭
@allyn301511 ай бұрын
Amazing explanation sir. Kudos 🙌 to your simple style of teaching. Hope to meet you soon sir❤
@PythonateWaleed3 ай бұрын
Toal Worth it Each and evry second of full course
@xyzatin5 ай бұрын
Refresh token maintained with http-only cookie (An HTTP-only cookie is a type of cookie that is inaccessible to JavaScript running in the browser, which makes it safer). These are important stuff if you are explaining tokens, I think.
@RajCreationAA10 ай бұрын
thank you so much hitesh sir, i was getting a lot error but i solved that myself by doing console log and by understanding the error problem, and after solving i thought i did something supercool thing! 😃😃
@earningapp5967 Жыл бұрын
Hitesh sir is god for me❤️❤️ Real teacher ❤️ I have no money to read computer engineering so i am reading commerce But i am interested in technology and software engineering So i am reading it from online By Hitesh sir I am learning coding full stack from his KZbin channel❤❤🎉
@Ansh0R Жыл бұрын
Same bhai👍 keep growing bro
@John-s9u5g3 ай бұрын
Hi sir today I fix two bugs in my code. I think because of you I am able to fix this bugs and I try to fix it. Nahito to bug dekhte hi me bhag jata. So, thank you very much.
@surajchauhan-fs2mt Жыл бұрын
bahut hi knowledgeable content sir❤
@rozinaansari53959 ай бұрын
Amazing backend series I ever seen 🎉
@ravisingh5906 Жыл бұрын
I am addicted to this channel
@kanailalmanna5005 Жыл бұрын
This series not just a series, this is backend university, we just loved it ❤🔥❤🔥❤🔥❤🔥
@anandstephan602010 ай бұрын
bhaut in depth video hai sir thanks for the video sir
@Merncodingschool23 күн бұрын
best course on youtube
@deepakdevaraj156 Жыл бұрын
Series is absolute fire 🔥🔥
@SurajGupta-ux2se Жыл бұрын
Thank you sir for this amazing session on accessToken and refreshToken