Cookies, Sessions, JSON Web Tokens (JWT) and More 🍪🔐

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น •

  • @samueljaworski5737
    @samueljaworski5737 2 ปีที่แล้ว +26

    This is one of the best videos I've seen on development, period

    • @LearnWebCode
      @LearnWebCode  2 ปีที่แล้ว

      Thank you! Glad it was helpful.

  • @ohmyumbrella
    @ohmyumbrella 2 ปีที่แล้ว +3

    I know someone is an amazing teacher when I start watching their video and I don't have to go back in time 10 times in every 2 minutes just to somewhat hang onto what they are saying. With your approach I just watched straight from start to finish and understood everything. I'm a really dumb person and it takes me frustratingly long to understand things compared to others. So I know you are a great teacher because watching this I actually felt smart.

  • @dhoneybeekingdom7889
    @dhoneybeekingdom7889 ปีที่แล้ว +1

    I have spent many many weeks reading about authentication, authorization, cookies, sessions, JWT, OAuth, etc. in order to implement my own backend from scratch. Little by little I'm ordering all the knowledge to get a clear idea of how all of this work. One confusing aspect was how and when to use a database or not. This video has helped me understand it better. Thank you!

  • @Rorschach9674
    @Rorschach9674 4 ปีที่แล้ว +9

    Thank you so much Brad. I'm currently at a coding bootcamp and I am constantly reaching for your videos first to supplement my learning. You have such a great way of explaining things! Really appreciate all your hard work :)

  • @thedigitalceo
    @thedigitalceo 2 ปีที่แล้ว +3

    All I can say is WOW. This is how to teach

  • @andrew_schaeffer
    @andrew_schaeffer ปีที่แล้ว

    Listening to Brad is like a warm cup of tea.

  • @getvivekjoshi
    @getvivekjoshi 4 ปีที่แล้ว +39

    Brad is awesome teacher and his teaching skills is just superb. thank you Brad and Wish you a Merry Christmas and Happy New Year!!

    • @rrvital1
      @rrvital1 4 ปีที่แล้ว +1

      True...One of the great 👍

    • @tanercoder1915
      @tanercoder1915 4 ปีที่แล้ว +1

      +1 he's one of the best out there! I like his style of easing in into a concept then expand on it and practice it. superb teaching skills!

  • @hamzafarrukh1702
    @hamzafarrukh1702 ปีที่แล้ว

    One of the best videos I have seen on Web Development. Hats off!

  • @girish8611
    @girish8611 2 ปีที่แล้ว

    One of the best video covering Cookies, Session and JWT. Thank you so much, it has helped me to get answers to the many question I had for long time.

  • @salvadorantonioperezmontie8065
    @salvadorantonioperezmontie8065 ปีที่แล้ว +3

    As a Jr Developer the only thing I can say to you is: Thank you! Nobody has ever been so clear about a very complex topic and explained in such detail the pros and cons of every approach. You just gained a subscriber.

  • @jessejoseph2643
    @jessejoseph2643 3 ปีที่แล้ว

    I'm so greatful that people like you exist. This video was so informative, thank you so much.

  • @goldfishbrainjohn2462
    @goldfishbrainjohn2462 3 ปีที่แล้ว +2

    I love the way you explained everything in detail.
    Your videos refreshed my knowledge of web technologies.
    Thank you.

  • @gindevgin9298
    @gindevgin9298 4 ปีที่แล้ว +2

    Hi brad, i am a french developper and i have rarely seen a so much good quality of teaching! i directly subscribe to your channel. and i am going to take a look to your training on udemy!

  • @nathanlewan
    @nathanlewan ปีที่แล้ว

    Very clear description. Got the concepts across better than any other video I've watched.

  • @juhandvan
    @juhandvan 2 ปีที่แล้ว +1

    I love the way you explained everything in detail. Brad is such an amazing teacher!

  • @streamx2
    @streamx2 4 ปีที่แล้ว +3

    You and Wes Bos are two of my favourite teachers. You both have the ability to teach complex topics. I have bought all your Udemy courses, always like and share your videos - I wish there was more I could do so more people could benefit from this.

    • @LearnWebCode
      @LearnWebCode  4 ปีที่แล้ว +1

      I've taken two courses from Wes, he's one of my favorites! He once retweeted me talking about my favorite part of his JavaScript 30 series and it made my day/week 😂. Thank you so much for all the support!

    • @streamx2
      @streamx2 4 ปีที่แล้ว

      @@LearnWebCode yes he made javascript click for me when i was very close to saying its not for me.

  • @Account001-k6f
    @Account001-k6f 10 หลายเดือนก่อน

    Bro this is exactly what I was looking for. Thanks a ton for making this masterpiece.

  • @AesSedai2020
    @AesSedai2020 5 หลายเดือนก่อน

    i love how you explain everything, thank you! really learned alot

  • @AabidIsmail
    @AabidIsmail 2 ปีที่แล้ว

    The way your video presents information from start to end is amazing!

  • @GarmrZero13
    @GarmrZero13 4 ปีที่แล้ว +9

    Damn, this video is good, like pure GOLD

  • @_yopee
    @_yopee 3 ปีที่แล้ว +1

    Brad is such an amazing teacher!

  • @Thejas2.0
    @Thejas2.0 3 ปีที่แล้ว +1

    Really, A BIGG PICTURE!

  • @talalhamdaoui1067
    @talalhamdaoui1067 ปีที่แล้ว

    Thank you very much for this very interesting tutorial with your clear both engish and explanation.

  • @shawnyiwerd
    @shawnyiwerd ปีที่แล้ว

    Ačiū už pasidalijimą. Neseniai naudojau Morelogin ir jis apsaugo privatumą.

  • @ctrl-alt-del0
    @ctrl-alt-del0 ปีที่แล้ว

    Thanks man. This is really a concise and comprehensive video.

  • @wtfdoiputhere
    @wtfdoiputhere 4 ปีที่แล้ว

    Absolutely best web dev channel on yt at least imo

  • @kylediamond8598
    @kylediamond8598 3 ปีที่แล้ว +1

    This is my first time watching your videos and I subscribed! You actually had answers to my questions

  • @sirrobinhood3409
    @sirrobinhood3409 2 ปีที่แล้ว

    Excellent presentation! Exactly what I was looking for. A detailed explanation of the client side. Thank You!

  • @muditagrawal7357
    @muditagrawal7357 2 ปีที่แล้ว

    This Literally has cleared lot of my doubts and confusions, I am really thankful to you Man, really good video !!

  • @rubenwesterberg3797
    @rubenwesterberg3797 ปีที่แล้ว

    This was a great video. Very demonstration of how the tech works.

  • @asdfghjkl5418
    @asdfghjkl5418 ปีที่แล้ว

    this is best i have seen on sessions.

  • @yaminaatmaoui2245
    @yaminaatmaoui2245 ปีที่แล้ว

    Thank you so much, you'r such an amazing teacher

  • @faisalahmadi3470
    @faisalahmadi3470 2 ปีที่แล้ว

    You made my Life easy, Keep your great work

  • @oanacristea2572
    @oanacristea2572 2 ปีที่แล้ว

    Waww. Great video: very well explained, showed how it works, pros and cons!! 10/10. Well done, Brad!

  • @kumaravelrajan
    @kumaravelrajan ปีที่แล้ว

    Thanks for this wonderful and concise presentation!

  • @mikkfri3370
    @mikkfri3370 6 หลายเดือนก่อน

    Thanks a lot for making this video! That was explained nicely!

  • @diegorobayo9013
    @diegorobayo9013 2 ปีที่แล้ว +1

    Amazing tutorial! Thanks

  • @wonjunjang3839
    @wonjunjang3839 3 ปีที่แล้ว +1

    Omg absolutely amazing video!!! It was so helpful for my fullstack project with authentication.

  • @saifashraf2135
    @saifashraf2135 ปีที่แล้ว

    Thank you, very clear and super helpful tutorial.

  • @eidenblock
    @eidenblock ปีที่แล้ว

    thank u man for absolutely amazing work that u do.

  • @johnravi3887
    @johnravi3887 2 ปีที่แล้ว

    Hi Brad,
    It was a great video! People are still unaware of important things such as cookies and web tokens, and you sharing insights and information about them will definitely help a lot of viewers. I did know about them, but I still enjoyed watching this video a lot. Thanks a lot for sharing such an amazing video. It was very informative, and I am sure it will add value to many lives. Looking forward to watching more amazing videos from you!

  • @yonathantekeste1618
    @yonathantekeste1618 6 หลายเดือนก่อน

    WOW What a Perfect explanation !

  • @alibaba888
    @alibaba888 3 ปีที่แล้ว

    Amazing teaching. Seeing the big picture helped me a lot, thanks!

  • @uquantum
    @uquantum 2 ปีที่แล้ว

    Thank you so much! Clear explanation delivered in a pleasant, enjoyable way! Who knew persistence could be such fun!😊

  • @janezklun
    @janezklun 4 ปีที่แล้ว +3

    Thank you for sharing very interesting web topics, Cheers

  • @cnc-form
    @cnc-form 4 ปีที่แล้ว +1

    Thank you for sharing your knowledge with the rest of us

  • @davidleiva211
    @davidleiva211 3 ปีที่แล้ว

    Great video! You really explained everything in only 45min, i love it!

  • @gat2871
    @gat2871 11 หลายเดือนก่อน

    Wonderful! Super well explained! Thank you

  • @kAh00t
    @kAh00t 3 ปีที่แล้ว

    Great video mate, clear and concise, I'll be sure to check out your courses soon :)

  • @ashrafulmijan1294
    @ashrafulmijan1294 7 หลายเดือนก่อน

    ❤❤❤❤❤❤❤. I'm requesting to you please make more and more videos over the technical concept like this videos.

  • @Alba-ig9hy
    @Alba-ig9hy 2 ปีที่แล้ว

    I so needed this. I loved it. Amazing.

  • @Onepiece_legends
    @Onepiece_legends ปีที่แล้ว

    Best explanation so far ❤ thank you

  • @aeronwolfe7072
    @aeronwolfe7072 ปีที่แล้ว

    awesome video! THANKS for the GREAT information!

  • @mohammadmaleki9415
    @mohammadmaleki9415 2 ปีที่แล้ว

    best video so far!!!!!!

  • @MettooQQ
    @MettooQQ ปีที่แล้ว

    Really really a great content and presentation. Thanks so much

  • @varunreddy5901
    @varunreddy5901 2 ปีที่แล้ว

    Great Explanation, Thank You

  • @TheEbbemonster
    @TheEbbemonster 2 ปีที่แล้ว

    Excellent explanation - just what I was looking for!

  • @eminm6383
    @eminm6383 3 ปีที่แล้ว

    awesome tutorial dude! keep the good work up!

  • @Aeturnist
    @Aeturnist 2 ปีที่แล้ว

    Awesome teacher !!

  • @gabinosta
    @gabinosta 2 ปีที่แล้ว

    Super cool video and you also explain things super clearly. Thanks a lot!

  • @maungmaungtar9651
    @maungmaungtar9651 2 ปีที่แล้ว

    Excellent explanation, than you so much.

  • @SpaceMonkey23101
    @SpaceMonkey23101 ปีที่แล้ว

    Excellent video - thank you very much.

  • @harikotha7
    @harikotha7 2 ปีที่แล้ว

    That's very detailed. Thanks brad!

  • @arjitarora8418
    @arjitarora8418 2 ปีที่แล้ว

    Great introduction, thanks!

  • @mahmooda4635
    @mahmooda4635 3 ปีที่แล้ว

    I am sad this video is older than one year and only just about 30k. Thank you..

  • @streamx2
    @streamx2 4 ปีที่แล้ว

    I bought all your udemy courses. Thanks for this series.

  • @yigitruzgaruzun7289
    @yigitruzgaruzun7289 4 ปีที่แล้ว

    In a word, an awesome expression

  • @dipankardey1044
    @dipankardey1044 ปีที่แล้ว

    I got my ideas clear after watching this video. just a question, can we make it like jwt maintained in cache only instead of local storage?

  • @sigmiami
    @sigmiami 4 ปีที่แล้ว +12

    I feel I just got fatter with all this talk of cookies

  • @toonice555
    @toonice555 2 หลายเดือนก่อน

    Great video!

  • @arazmammadov9276
    @arazmammadov9276 3 ปีที่แล้ว

    Thanks for the Big Picture!..

  • @RainOnline
    @RainOnline 3 ปีที่แล้ว

    I cant be thankful enough.

  • @GeorgesMayrink
    @GeorgesMayrink 2 ปีที่แล้ว

    Thank you, Brad. Great video clarifying a couple of things we sometimes use without fully understanding. I will check your Udemy courses for sure. 👍

  • @DannyAwad
    @DannyAwad 4 ปีที่แล้ว

    very helpful video, I love you Brad!

  • @ינוןאלבז-כ1ז
    @ינוןאלבז-כ1ז 4 ปีที่แล้ว

    Your git and wordpress curses on udemy make me real developer thanks a lot

  • @leonvanrijswijk8409
    @leonvanrijswijk8409 4 ปีที่แล้ว

    Thanks a lot. Very clear explanation

  • @genesdada7045
    @genesdada7045 4 ปีที่แล้ว

    wow this what was lookin' for.asante sana.

  • @ahmadhassan3131
    @ahmadhassan3131 2 ปีที่แล้ว

    how i can like this video thousand times?👍👍👍👍

  • @alphayowakarindi
    @alphayowakarindi 2 ปีที่แล้ว

    Thanks for the video. What mic are you using please?

  • @Relax-ls1xi
    @Relax-ls1xi 3 ปีที่แล้ว

    Very very good lesson. Thanks man. Can you say to me how i run ahrefs on my subdomain?

  • @areyoukidding6274
    @areyoukidding6274 3 ปีที่แล้ว

    Hi Brad, How session ID(connect.sid) is stored in cookie @20:43 . In the code you never set cookie in the response. and @20:43 _csrf should be in hidden input value but why it is in cookie. I re-watched so many times still couldn't understand. Can you help me please?

    • @LearnWebCode
      @LearnWebCode  3 ปีที่แล้ว +1

      Hi, we didn't manually write the code to store connect.sid as a cookie, but the express-session NPM package does that for us. The _csrf cookie is created automatically by the csurf NPM package; it stores that cookie so it can use it to validate the hidden input value.

    • @areyoukidding6274
      @areyoukidding6274 3 ปีที่แล้ว

      @@LearnWebCode Thank you Brad ❤

  • @whoman7930
    @whoman7930 4 ปีที่แล้ว

    At 17:00, the hidden field can easily be seen the inspector mode. So, what about that??
    Or I guess, the token would be random each time.

    • @LearnWebCode
      @LearnWebCode  4 ปีที่แล้ว +3

      Hi, that's okay because yes you as the visitor of that legit page can view the inspector / source, but we're just trying to prevent other sites from making requests on our behalf and taking advantage of our cookies being automatically sent without us knowing. In this case, those other sites can't view the DOM of our page. So yes, they can try to send a request on our behalf but it will fail without that hidden field value. Or I guess you could say, that hidden field protects us from CSRF not XSS.

  • @unzestedegourmandise2826
    @unzestedegourmandise2826 4 ปีที่แล้ว

    miammmmm ça semble sacrement délicieux merci !

  • @nitishgupta8393
    @nitishgupta8393 3 ปีที่แล้ว

    How I should thank you... This helped me a lot

  • @kienphan6436
    @kienphan6436 3 ปีที่แล้ว

    Great video.

  • @thomashuntsman9566
    @thomashuntsman9566 4 ปีที่แล้ว +1

    brilliant

  • @Arun-ev2xu
    @Arun-ev2xu 3 ปีที่แล้ว +2

    Thanks for a great session Brad!! It was wonderful.
    Have a query , Is it possible to use JWT stored in local storage for a multi page application?
    I understand that If we use session cookies, on every Page Load / Page redirection cookies will automatically be sent in the browser GET request.
    How can we handle such scenarios if JWT is stored in local storage?

  • @andreacovacci1339
    @andreacovacci1339 2 ปีที่แล้ว

    amazing! thanks!

  • @islamabdelhakiim7258
    @islamabdelhakiim7258 ปีที่แล้ว

    thank you so much ❤

  • @geniusskills6151
    @geniusskills6151 ปีที่แล้ว

    Bro went like .. this video is sponsored by me lol

  • @srikantha8732
    @srikantha8732 2 ปีที่แล้ว

    There's something wrong here when u are trying simulate the CSRF attack, I don't see Cookie being sent to Server from another TAB when i reproduced it, even when i opened the other tab Application Storage , i dont Cookie being shared across the browser TABS.
    and i don't see cookie being sent and it works perfectly with FAILED message. So at #13:10 I am assuming that you did something in the background to have that cookie at that TAB as well.
    So I am suspecting this is not a TRUE Simulation of that Attack ? what do u say @learnWebCode?.
    But i do like this video content FYI

    • @LearnWebCode
      @LearnWebCode  2 ปีที่แล้ว

      I don't recall doing anything off camera for that cookie example, at the time I recorded it, it was reproducible by following along. Is it possible you were using a privacy focused web browser like Brave? In one of my examples I remember the CodePen CSRF attack example was only possible in FireFox but not Chrome.

  • @SA-oj3bo
    @SA-oj3bo 2 ปีที่แล้ว

    Hi, what is exactly stored in the session id cookie in the browser? I thought it would not change during the session, but I noticed if you add an extra key/value pair at the session at server side with Flask, the cookie at the browser is changed too. Can I read/decode actually what is stored at the browser with the flask secret key? And why is the session id cookie changed? Thanks in advance!

  • @yapayzeka
    @yapayzeka 3 ปีที่แล้ว

    this is gold

  • @mwaqaspro
    @mwaqaspro 4 ปีที่แล้ว

    You are great sir

  • @gunashekarmc1405
    @gunashekarmc1405 11 หลายเดือนก่อน

    Easy understanding

  • @himthakur619
    @himthakur619 3 ปีที่แล้ว

    For login, what should we use cookies or localstorage?

  • @KendaBeatMaker
    @KendaBeatMaker 2 ปีที่แล้ว

    Thank you!

  • @joker-wr8pt
    @joker-wr8pt ปีที่แล้ว

    but what if we store the jwt as the cookie right ,just came in my mind

  • @ankujkumar
    @ankujkumar 4 ปีที่แล้ว

    Sir u r amazing...❤️❤️❤️❤️❤️

  • @gautamarora3066
    @gautamarora3066 3 ปีที่แล้ว

    Thank you for an excellent explanation. I have a question. How would session cookie can prevent a malicious user to gain access? Session related cookie is stored on the browser like any other cookie and it will be sent back with each and every request. It's similar to the example you have in the earlier part of the video where a malicious user sends a POST request.

    • @LearnWebCode
      @LearnWebCode  3 ปีที่แล้ว

      Can you give an example of the type of malicious user / attack you have in mind? I'm not sure I understand your question. If we require a CSRF token along with the cookie's value then other malicious site's can't make successful requests on our behalf because they don't have access to the page/DOM with the CSRF token in it. Do you mean if someone physically steals someone's laptop and looks in their browser's cookie values? Or if our site is compromised and is serving up malicious JavaScript to our visitors?

    • @gautamarora3066
      @gautamarora3066 3 ปีที่แล้ว

      ​@@LearnWebCode actually you are right, CRSF token along with session Cookie value should prevent malicious user's request. Shouldn't CRSF token also prevent malicious requests even if someone steels the laptop and gain access to browser cookie values ? Besides, session cookies, I was also thinking what possibly can a malicious user do to gain access to JWT token and use it to make successful requests ?