User Authentication in Web Apps (Passport.js, Node, Express)

Поділитися
Вставка
  • Опубліковано 27 вер 2024

КОМЕНТАРІ • 316

  • @EddyVinck
    @EddyVinck 3 роки тому +34

    I watched this on Zach's channel first. For anyone wondering, it's absolutely worth to to follow the entire thing!

  • @fattyboombatty7736
    @fattyboombatty7736 2 роки тому +37

    Zach, one thing I really like about your videos is that you don't edit out the mistakes when you make them, but correct them in full view. I find this useful as it gives me the opportunity to think why something didn't work too. It is a really helpful learning aid (well for me it is).

    • @stevesmith0624
      @stevesmith0624 10 місяців тому

      debugging is super important in programming too, it gives you an idea on how to debug your code for beginners out there

  • @benjamincastro541
    @benjamincastro541 3 роки тому +40

    Can't thank you enough for this tutorial. I have also watched several tutorials that have left me with more doubts than answers, so I appreciate how thorough this tutorial is. Amazing job!

  • @ishehad8091
    @ishehad8091 3 роки тому +13

    I ike the guy's tempo. A lot of youtubers try to keep videos short by talking really fast - to the point where it becomes impossible to follow and comprehend. This guy makes it just right - very easy and pleasant to listen. Good job!

    • @chadiusmaximus9350
      @chadiusmaximus9350 3 роки тому

      Agreed

    • @EnLaMitad
      @EnLaMitad 3 роки тому

      Definitely. When I hear someone talking about their "dense" content I immediately raise an eyebrow.

  • @CodeShockDev
    @CodeShockDev 3 роки тому +12

    To my name sake, this is really well done! I am a mid level node developer and found the steps and extra bits you gave to be outstanding and more then worth the time spent going through it. Well done sir!

  • @keenanmolver9689
    @keenanmolver9689 3 роки тому +47

    Finally a video where I don't feel like a parrot, just copying what they're typing trying to understand.

  • @rajnori.
    @rajnori. 2 роки тому +6

    Probably the best tutorial online for user authentication! Excellent delivery of the middleware concept with user authentication flow. @Zach Gollwitzer, you're a legend! Keep up the great work.

  • @baderidrees
    @baderidrees 7 місяців тому +2

    That was full of information, especially the distigush of hashing and encryption, I watched the whole 6 hours of it. 🙂🙂

  • @gavinwatson4549
    @gavinwatson4549 Рік тому +8

    The video helped me a lot to understand authentication with passport, jwt, session-express and many other things, really thank you very much :')

  • @md.siddiq7165
    @md.siddiq7165 3 роки тому +12

    I watched this series few days ago. The series is just awesome & perfect for beginners.

    • @ogunsadebenjaminadeiyin2729
      @ogunsadebenjaminadeiyin2729 3 роки тому +1

      Please can you describe what this series is about, for a novice?

    • @md.siddiq7165
      @md.siddiq7165 3 роки тому +2

      @@ogunsadebenjaminadeiyin2729 Websites that we visit has a signup, sign In functionality which helps to authenticate the user. The series is about authentication and also authorization. It is one of the basic things in backend development. Hope you got your answer

    • @panomapet9441
      @panomapet9441 3 роки тому

      where is the series/playlist?

    • @md.siddiq7165
      @md.siddiq7165 3 роки тому +2

      @@panomapet9441 actually Zach has his own youtube channel & he uploaded this whole 6hr long video as a series in his channel.

    • @panomapet9441
      @panomapet9441 3 роки тому

      @@md.siddiq7165 I got his channel. Thanks

  • @timfranklin4724
    @timfranklin4724 2 роки тому +1

    Finally! This is what I've been looking for for months. Like you said in the video, it's always "learn authentication in 5 minutes".

  • @cyberducc
    @cyberducc Рік тому +4

    This is the most important tutorial I've ever seen about authentication. The topics presented in this video are invaluable to me and many other devs. Thank you so much Zach. I will refer this tutorial to anyone wanting to learn authentication in nodejs apps. 🚀

  • @bloodzz4813
    @bloodzz4813 3 роки тому +1

    A really good tutorial, so if anyone is watching it rn, I would like to explain some stuff you need to know,
    1. don't use the way he uses connect-mongo bc I struggled doing it like him, that's bc this tutorial is a bit outdated, there is a new way of using connect-mongo , look at the docs for it...
    2. Once you get to the local strategy it will feel a bit overwhelming so I recommend installing and work and code along, generally look for another tutorial then look for his tutorial at that part just to understand some stuff he goes throw quickly, like hast, salt, etc.
    That's what I did myself.

  • @justcreate1387
    @justcreate1387 Рік тому +2

    I haven’t completed the video yet. But I must say..thank you for being such a clear and concise teacher!

  • @joshuacushing2858
    @joshuacushing2858 2 роки тому +1

    I really appreciate your compassion and desire to make no assumptions in your descriptions. As a beginning developer, I have experienced exactly what you are talking about. Someone breezes through a concept, and I am left thinking, "Was that supposed to be straightforward?" Thank you so much for acknowledging how many complicated steps go into this process and helping to break it down.

  • @justinfitzpatrick1074
    @justinfitzpatrick1074 2 роки тому +4

    This is a really phenomenal job of explaining this topic and helped me in my work immensely. The only video I've found that didn't talk over my head. Thank you Zach!

  • @shaocongshi2001
    @shaocongshi2001 2 роки тому +3

    This is one of the best tutorials I have ever encountered! Thanks so much for your time and effort. I learned a lot.

  • @HishamElmorsi
    @HishamElmorsi 4 місяці тому

    Thanks, that was amazing! The instructor teaches concepts of authentication, how to implement without abstraction and how tech like passport.js actually works under the hood.

  • @aminarahman2429
    @aminarahman2429 Рік тому

    I have coded along up-to Express MIddlewares so far, never have these concepts been clearer than it is now after watching your video. Thanks a lot!!

  • @Jp_codes
    @Jp_codes 3 роки тому +2

    Zach. you are a blessing. where have you been?
    ten minutes into the video and am already feeling great...

  • @LetsGeTDeep
    @LetsGeTDeep 2 роки тому

    If you are on the fence about this tutorial, watch it until at least the passport section ends. Phenomenal lesson.

  • @NAYY_STUDIOS
    @NAYY_STUDIOS 7 місяців тому

    First authentication video and I am confident will master it soon. Thanks Zach

  • @official.mhm13
    @official.mhm13 3 роки тому +1

    Watched this complete tutorial and it was one of the best and comprehensive tutorial I have ever watched. Thanks Zach!

  • @delektowski
    @delektowski Рік тому +1

    Your deep understanding of what you didn't understand made that tutorial easy to understand! :-) Thank you.!

  • @delektowski
    @delektowski Рік тому +2

    Great middleware explanation! Thank you! :-) I am continuing to watch that further!

  • @mateovivas6920
    @mateovivas6920 3 роки тому

    Watched 6 hours in 2x speed and still could get the whole thing. Pretty good explanation.

  • @krobi26
    @krobi26 2 роки тому

    thank you! This was great! I had watched a few quick tutorials elsewhere but had no idea why I was copying and pasting all the stuff they prescribed. This gave me an actual understanding of what everything is doing.

  • @christiankomodo
    @christiankomodo 3 роки тому +1

    Your videos are great! Thorough and beginner-friendly but brings you through the whole thing. Perfect!

  • @alexhein5248
    @alexhein5248 2 роки тому

    This tutorial clear the confusion out of me about authentication and how cookies work

  • @hunl.919
    @hunl.919 3 роки тому +1

    This cleared up so many of my questions as a starter especially on topics like cookies, sessions, and other accompanying middlewares. Bravo!

  • @rjwhite4424
    @rjwhite4424 10 місяців тому

    fantastic video. Spent an entire work day watching this video and it was well worth it!

  • @-seoulair
    @-seoulair Рік тому

    I have a feeling this is gonna be great. Can't wait to finally understand session and jwt

  • @dimitriss3635
    @dimitriss3635 2 роки тому +3

    For those having newest version there are slight tweeks:
    const MongoStore = require('connect-mongo'); /** not require('connect-mongo')(session) **/
    connection.on('open', () => { /** not 'connecting' **/
    console.log('connected');
    });
    app.use(session({ /** use MongoStore.create({mongoUrl:process.env.DB_URI}) in the store option **/
    secret: process.env.SECRET,
    resave: false,
    saveUninitialized: true,
    store: MongoStore.create({mongoUrl:process.env.DB_URI}),
    cookie: {
    maxAge: 1000 * 60 * 60 * 24 // Equals 1 day (1 day * 24 hr/1 day * 60 min/1 hr * 60 sec/1 min * 1000 ms / 1 sec)
    }
    }));

  • @silkiercomet
    @silkiercomet Рік тому +1

    for anyone interested the use of the connect-mongo package is deprecated as well as the mongoose, use this video to grab concepts but no to code along

    • @NostalgicFeelins
      @NostalgicFeelins 10 місяців тому

      I have been struggling with connecting my database

  • @CalebStephensPlaysPiano
    @CalebStephensPlaysPiano Рік тому +3

    Also if anyone is watching this and using vite and is having trouble getting the request cookie after the server sets the cookie, then you are probably running into a sameSite issue where the browser is not attaching the cookie to the request header for security reasons. A workaround is to set up a proxy server in your vite config file. Just a heads up. Holler if you have any questions.

  • @nirmal_kumar
    @nirmal_kumar 3 роки тому

    Excellent Tutorial to understand not just Authentication but also the Fundamentals of Cryptography with JWT

  • @tylerdurden2832
    @tylerdurden2832 3 роки тому +2

    I was waiting for this for yearssssss man.

  • @tarasgolyk6525
    @tarasgolyk6525 3 роки тому +4

    Perfectly! But I would watch all 10 hours of video if there was a continuation about the refresh token 😉

  • @MrMagicPenguin12
    @MrMagicPenguin12 2 роки тому

    Extremely thorough, worth the time for any beginner!!

  • @ayushshaw3681
    @ayushshaw3681 2 роки тому

    This video was a savior for me. I was facing the exact same problems which you mentioned in the beginning.

  • @audraogilvy2605
    @audraogilvy2605 2 роки тому

    Thank you very much for teaching so conscientiously. It was obvious you cared that people who are trying to learn will understand. I watched someone else's video and he went so fast and didn't explain a lot, and that can get frustrating and discouraging. It's so nice that you guide us at a proper pace for students.

  • @Wilespro1
    @Wilespro1 3 роки тому

    You are the best! It is clear that you want people to really understand things. Thanks for making this video!

  • @stevesmith0624
    @stevesmith0624 10 місяців тому

    very well organized and explained course, thanks guys for putting out another banger

  • @madhurmongia6381
    @madhurmongia6381 3 роки тому

    first of all introduction got hooked me up like the guy read my mind i was using firebase for authentication but i think now i am ready for my owm backend.

  • @arpitanand6534
    @arpitanand6534 3 роки тому

    Man!! You have taken care of and have explained every other aspect of what you wrote in the code!! This is just amazing. ❤

  • @shivkumarsingh5315
    @shivkumarsingh5315 2 роки тому

    You are the best! So many doubts, all resolved in just one video. Thank you so much!

  • @raj_soni4007
    @raj_soni4007 6 місяців тому +1

    your teaching skills are good good good good power 3000

  • @chadiusmaximus9350
    @chadiusmaximus9350 3 роки тому

    My next day off I am going to consume this whole video. Thank you.

  • @mpowers3311
    @mpowers3311 3 роки тому +1

    great! worth to follow this man. Great teacher I have ever watched .

  • @sayidmuhammad443
    @sayidmuhammad443 3 роки тому +1

    I love this guy he is an amazing teacher

  • @ndahayokevin7626
    @ndahayokevin7626 2 роки тому

    Amazing, Now I am going to develop strong backend applications.

  • @punisherash388
    @punisherash388 Рік тому

    This is a great video, not because it did what it has to, but because it amde you familiar with options, what else and etc. nice content.

  • @abdurrahimahmadov4309
    @abdurrahimahmadov4309 2 роки тому

    Thank you for this amazing course! This course and FCC QA curriculum helped me a lot to understand the passport framework.

  • @dragosgeorge1086
    @dragosgeorge1086 3 роки тому

    I can't believe how good this tutorial is. Thank you so much!

  • @sumprj
    @sumprj 2 роки тому

    Thank you for your efforts. Sharing knowledge is easy but delivering in such a way that everyone can understand is very much difficult. We need a hell a lot of preparation for that. Hats off to your efforts.

  • @amirsaad8627
    @amirsaad8627 3 роки тому

    thank you Zach this really boost me forward to understand how this working after long time stuck and disappointed about auth subject. thank you :)

  • @sameershahbaz8821
    @sameershahbaz8821 2 роки тому

    big fan of your teaching method sir, clear and concise with great detail...hoping you to get more exposure among people so that they can learn from you, please release reactjs course I really wanna learn from you, because I have been scratching my head with so many tutorials on youtube and didnt get help. thank you sir

  • @mohithadiyal6083
    @mohithadiyal6083 3 роки тому

    This channel is something I recommend to every one.

  • @contentshark5122
    @contentshark5122 3 роки тому

    Such an amazing explanation !! Thanks a million !! Even just for one sec I didn't feel like I am struggling to understand...

  • @chandisannidhanam4440
    @chandisannidhanam4440 2 роки тому

    Thanks ! Zach for the great tutorial ! it's really awesome course on the User Authentication ! All 6 :13 hours is really worth, loaded with full of information , which I can really apply .

  • @Picklin
    @Picklin 3 роки тому

    Thanks so much for this video! Very clear and impact my understanding about middlewares/sessions working.

  • @vedantchaudhari2672
    @vedantchaudhari2672 7 місяців тому

    Really nice explanation. Simple yet crucial.

  • @josbexerr5166
    @josbexerr5166 3 роки тому

    Muchas Gracias Mister Zach, por una gran Catedra......saludos de los andes Peruanos

  • @samuelrajdev3412
    @samuelrajdev3412 7 місяців тому +1

    Wonderful!!

  • @pranit_7D
    @pranit_7D 3 роки тому +1

    Amazing! I was just looking for this

  • @dreamer5632
    @dreamer5632 Рік тому

    thank you so much Zach you explained so many things so simply thanks a lot

  • @zeldris6218
    @zeldris6218 3 роки тому +1

    Amazing , thats all I was looking for 🔥🔥

  • @TechReagan
    @TechReagan 3 роки тому +1

    This is awesome, thanks for sharing. I will watch till the end.

  • @hemantvardani1436
    @hemantvardani1436 4 місяці тому

    Thanks!! for this beautiful video :)

  • @jacoblee440
    @jacoblee440 8 місяців тому

    I appreciate the info, Zach. I do want to point out, at 3:11:00, you do not generate the EC keys you were talking about, instead, you generated RSA keys.

  • @muxammad2777
    @muxammad2777 3 роки тому +1

    I don't know what to say, thank you very much you are awesome man

  • @jon1867
    @jon1867 Рік тому

    This video is phenomenal! Great Work

  • @SunilVGandhi
    @SunilVGandhi Рік тому

    Nice, precise and concise. I am enlightened 👌

  • @netpeggle4458
    @netpeggle4458 2 роки тому +1

    *chuckle* --------------------Complexity--------------> points directly onto him 😂

  • @Samsul2013
    @Samsul2013 3 роки тому

    superb and speechless ...explanation crystal clear

  • @DjokovicAirlines
    @DjokovicAirlines 3 роки тому

    Thanks for JWT Strategy in Angular. That was super useful!

  • @alializadeh4542
    @alializadeh4542 3 роки тому

    Thank you I was waiting for this course

  • @toihirhalim
    @toihirhalim 3 роки тому +1

    the course I didn't know I need

  • @haroldpepete
    @haroldpepete 9 місяців тому

    i love when somebody says, i"m a full stack developer

  • @rohitsrao
    @rohitsrao 2 роки тому

    This was brilliant. Thanks a TON for sharing it.

  • @lewiduressa
    @lewiduressa Рік тому

    This is literally the best video!!

  • @abhinavsingh-zc2hk
    @abhinavsingh-zc2hk 3 роки тому

    Best tutorial ever on auth 🧡🧡🧡

  • @filix6360
    @filix6360 10 місяців тому

    Very informative...keep at it man!.

  • @SuperSarhanWebdev
    @SuperSarhanWebdev 3 роки тому +3

    Hello Zach I am a react and vue developer, can't u guys provide the same vodeo but adding a different last part one for vue and one for react i have been learning a lot here and would love to see more

    • @chiragarora9616
      @chiragarora9616 3 роки тому +1

      You shouldn't ask for literally everything

    • @SuperSarhanWebdev
      @SuperSarhanWebdev 3 роки тому

      @@chiragarora9616 u can mind ur own business and honestly for me I have running projects with auth witjout pasdport just node, express and jwt for the token

    • @SuperSarhanWebdev
      @SuperSarhanWebdev 3 роки тому

      @Kotetsu Chan i didn't see me asking u? Lol what's wrong with people not being able to mind their own damn business 🤷

  • @MuhammadAhmedAshraf
    @MuhammadAhmedAshraf 2 роки тому +1

    no this course is not for beginners but for intermediate developers because i a newbie

  • @shamkhall
    @shamkhall 2 роки тому

    thank you very much. it is a very helpful lesson.

  • @lonniewibberding2504
    @lonniewibberding2504 Рік тому +1

    Thanks!

  • @edwardpaoloburgosnunez2127
    @edwardpaoloburgosnunez2127 3 роки тому

    Zach is a genius

  • @matinotsaintilus4124
    @matinotsaintilus4124 3 роки тому +1

    Great work... Tuto on fire

  • @shidro9450
    @shidro9450 2 роки тому

    Thank you for this video its been very helpful one!

  • @acopernic
    @acopernic 3 роки тому +1

    Bravo and thank you. Will check your channel .. 👏👏

  • @Killow
    @Killow 3 роки тому

    Very great content, high quality tyou !

  • @creativetech8471
    @creativetech8471 3 роки тому +2

    should have covered social login with passport, anywhoo Great Content for Free

    • @eakerz5642
      @eakerz5642 3 роки тому +1

      Ah so it doesnt cover logging in with Google or FB? I don't want to bother my visitors with them filling in forms and use their brains for a few seconds.

    • @zachgoll
      @zachgoll 3 роки тому +4

      I'm considering doing a social login tutorial on my channel. It is definitely on the list.
      Also, Passport is a very widely-scoped middleware. Once you understand the core functionality, additional strategies will be easier. In addition, the JWT and crypto sections of this course will be very helpful for understanding delegated auth (like OAuth 2.0) since it uses these heavily for its flows and tokens.

    • @ivankrupskyi8984
      @ivankrupskyi8984 3 роки тому +1

      @@zachgoll man you're cool !
      @eakerz lol read the docs and implement it yourself...

  • @abdullahsoomro6238
    @abdullahsoomro6238 Рік тому

    You explain it very well thank you.
    But I think if we want to implement just userName and password authentication then passportjs should not be used. We should use express-session only for that. And implement all the functions for authentication and authorization.
    Passportjs is helpful when we want to use more than 1 strategies.
    This is how i think. 😇

  • @muhammedqazi
    @muhammedqazi 2 роки тому

    The best video

  • @Rogueixpresents
    @Rogueixpresents 3 роки тому

    6 hour of goodnesssss!!!!!!!!!!!!!!!!!!!!!

  • @milindjoshi6012
    @milindjoshi6012 3 роки тому +1

    Great work 💪

  • @Itzhak-l8u
    @Itzhak-l8u 11 місяців тому

    תודה!

  • @theblackunderflow1842
    @theblackunderflow1842 2 роки тому +33

    This tutorial is criminally underrated. Watched the whole way through. 10/10.

    • @bekiteshome4670
      @bekiteshome4670 Рік тому +1

      yoo how is your full stack journey?

    • @theblackunderflow1842
      @theblackunderflow1842 Рік тому

      @@bekiteshome4670 it is at a standstill my brotha, going back to school in the fall and hoping to snag internship opportunities from there.

    • @bekiteshome4670
      @bekiteshome4670 Рік тому +1

      @@theblackunderflow1842 I hope you get what you want goodluck

    • @theblackunderflow1842
      @theblackunderflow1842 Рік тому

      @@bekiteshome4670 thanks, good luck to you too!

  • @digigoliath
    @digigoliath 3 роки тому

    Awesome!!! TQVM!!