Session Authentication in Express

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

Комментарии • 269

  • @CodeRealm
    @CodeRealm  6 лет назад +57

    Hey guys, it's Alex again. I know the config for express-session can feel a bit daunting at first (I had to read through very carefully myself), so I created a reference guide that explains each option in detail. You can find it along with other presentations on GitHub github.com/alex996/presentations/blob/master/express-session.md

    • @medi7573
      @medi7573 6 лет назад

      please if i may ask ,which algorithm used to hash session ID sent in the cookie?

    • @CodeRealm
      @CodeRealm  6 лет назад +4

      @@medi7573 HMAC SHA256 github.com/tj/node-cookie-signature/blob/4496ae0795ef0fb6303184e1f44370546663e2e4/index.js#L20

    • @ctna211
      @ctna211 5 лет назад +3

      Thank you. It is really daunting.
      The way the documentation of express-session is written assumed that readers already know a pretty big deal.

    • @kwakukente7867
      @kwakukente7867 5 лет назад

      my app works fine on localhost but it doesn't login when i deploy it to heroku. Any help?

    • @SmokyBigSmoke
      @SmokyBigSmoke 4 года назад +1

      Thank you so much

  • @captainalpha4853
    @captainalpha4853 2 года назад +12

    For people who are watching this video : at 20:10 in the newest versions of Express, body-parser package is now built-in in Express. All you need to do is use it as a middleware like this : app.use(express.json()) and app.use(express.urlencoded({extended: true}))
    Thanks for the video!

  • @mautrix8813
    @mautrix8813 5 лет назад +56

    At first I was like "wow dude this guy is way too fast", but after watching a lot of many other tutorials I realized yours are actually the best ones, straight to the point, while most of the others just do a 2 hours video for something that could've been explained in 30.
    I surely can't fully understand this in 40 minutes, but I sure can pause the video and/or rewatch all the parts I didn't get at first and I'll know that I won't waste time since there's no dead moment
    Great job and thank you :^D

    • @sheldonfourie5959
      @sheldonfourie5959 4 года назад +1

      yeah this video is still sol relevant and to the point

  • @MarkDeibert
    @MarkDeibert 4 года назад +11

    A year and a half later and this is still *the best* express-session tutorial. By far! Thank you for this Alex!

  • @xdqd
    @xdqd 6 лет назад +24

    This channel is probably the best thing I found on the internet

  • @MichaelAbebreseAgyeman
    @MichaelAbebreseAgyeman 6 лет назад +54

    Also, we can chain our routes if the have the same path like, "/login". Example:
    app.route("/login")
    .get(function (req, res) {
    res.send('Login page"')
    })
    .post(function (req, res) {
    res.send('post login')
    });

  • @diegor5805
    @diegor5805 4 года назад

    I made a ridiculous amount of progress just from a few of your videos! My latest commit is the biggest I've ever made! Keep it up, and thank you!

  • @CAPS_AMERICA
    @CAPS_AMERICA 3 года назад

    A BIG THANK YOU for the level of detail and simplicity of this authentication tutorial, it has cleared my confusion on this topic as to when does the client know the user is still connected, or how the session is checked and validated! I've honestly seen this video and watched it on 1.5x before and I didn't get the pointers, so I watched a few more videos on the same topic but got really confused because there's no clear explanation how they validate the session data, how logging in and out works when the session is created/destroyed or how the server uses the session to determine the current user! So I finally watched your video on normal speed, and got the ideas right! I know how JWT authentication works already, it works on the payload, but this session authentication using express has eluded me, so thanks again!

  • @alimahdi6379
    @alimahdi6379 5 лет назад +1

    Great job Alex. Really useful. I was doing well until around 30:00. It got over my head afterwards. But I discovered your new Authentication/Authorization series and will be going those for sure. Thanks for getting me up and going in a very short time. Cheers.

  • @ThiagoAdomaitis
    @ThiagoAdomaitis 3 года назад

    Thank you for this video. This is a great tutorial, I could learn, understand, and now I'm going to try to implement all the 'to dos' by myself.
    Even today, almost 3 years later, It is not so common to find content abou session auth (JWT all over the place), let alone a so well produced material, so congratulations and thank you again.

  • @ashishsaini7325
    @ashishsaini7325 3 года назад

    Thank you so much alex. From last 3 days i was trying to learn how to implement session based authentication and i failed but from this video, I learned it easily.

  • @vigneshpugaz8308
    @vigneshpugaz8308 4 года назад

    tried many tutorials for authentication.This is by far the best explaination I have listened to.Cheers :)

  • @louisruocco1746
    @louisruocco1746 4 года назад

    Saved my life. So many hours and days of struggles and finally I have solved my problem thanks to you! Keep up the good work!

  • @connormccafferty5288
    @connormccafferty5288 3 года назад

    This is the best video on NodeJS authentication I have seen. Thanks

  • @diegor5805
    @diegor5805 4 года назад +4

    2:44 express-session [options], cookie and process.env configuration
    11:57 authentication/routes
    14:35 render HTML elements based on authentication
    15:33 pseudo database
    20:57 protected routes/middleware
    23:45 very simple login validation
    25:37 very simple registration validation
    28:37 logout
    30:14 res.locals middleware
    32:56 persist sessions
    33:49 cookie extension
    38:31 final steps for production

  • @SwapnilSoni
    @SwapnilSoni 5 лет назад +5

    Simple, clean and quality voice == best tutorial

  • @GeorgesMayrink
    @GeorgesMayrink 4 года назад +1

    This video has been so useful to me that I wish I could 'like' it many times. I've checked it three times already as a refresher. Thank you, Alex. 👍

  • @hawaijarjs7496
    @hawaijarjs7496 5 лет назад

    I'm still in the middle of this.. but this is way too good so far. It's clear, concise and to the point. Thanks for your time buddy!

  • @nikitabalakin1498
    @nikitabalakin1498 4 года назад +1

    Thank you BRO! From Russia with love

  • @dcmbassi
    @dcmbassi 5 лет назад

    Coming from perhaps the absolute beginner in Node, thank you. I not only understood the basics of session management, you helped me improve my workflow as well. Currently trying to adapt this with your suggestions (database, validation, hashing...). Running into issues, but I'm confident I'll crack it soon. I'm grateful. Have a sub.

  • @LeeCharles1968
    @LeeCharles1968 6 лет назад +1

    Hey there! I have to give you a huge thumbs up! This is one of the best tutorials I have ever watched! Everything you said made sense and you didn't speak to hear yourself talk. You got straight to the point and everything was clear and concise. Thank you! I liked and subscribed and will be watching more of your videos. Once again...GREAT JOB! Wish others made excellent tutorials like this one. Take care, Lee

  • @ritikagrawal1867
    @ritikagrawal1867 3 года назад

    Bro u r seriously amazing. This is the first video I have watched of urs and I am a fan of ur to the point videos with all the minor explanations as well.
    Btw I watched at 1.5x speed 😂. Perfect

  • @BhavdeepHere
    @BhavdeepHere 5 лет назад +1

    I liked this tutorial. Best among youtube videos I watched to meet my session management requiremnent with Node.js

  • @shubhamsingla2120
    @shubhamsingla2120 5 лет назад

    Wow u have even written everything in the comments on the notes too. That is really awesome.

  • @berakoc8556
    @berakoc8556 4 года назад

    RUclips clearly works for the sake of this channel.

  • @ElroyToscano1623
    @ElroyToscano1623 3 года назад

    Thanks for this tutorial. Completely clear of express-session

  • @djmonteur
    @djmonteur 4 года назад +1

    Many many thanks for this tutorial. Ofcourse I understood the principle of cookies but never knew how to use it in my requests. Thanks!

    • @shrijaykesarwani6773
      @shrijaykesarwani6773 4 года назад

      Sir i didn't get why you use redirectHome into login POST request?

  • @Justin_Min_001
    @Justin_Min_001 4 года назад

    You are so knowledgeable. I've leant quite a few useful things that I didn't know.

  • @bhaktikadam9864
    @bhaktikadam9864 4 года назад +1

    Thank you for this amazing series....🤗👍👍

    • @shrijaykesarwani6773
      @shrijaykesarwani6773 4 года назад

      Sir i didn't get why you use redirectHome into login POST request?

  • @oneplus1861
    @oneplus1861 4 года назад

    Omg Struggled for so many days and now it's clear!

  • @MsSomegirl1
    @MsSomegirl1 3 года назад +1

    Great tutorial!! You explained it so clear and simple! Thanks!

  • @mihaiperju6235
    @mihaiperju6235 5 лет назад

    Very good explanation. I'm doing this for the first time and it makes complete sense

  • @timomuller9161
    @timomuller9161 5 лет назад +2

    love the pace, love the clear language. thank you !! :D

  • @bright.fantine
    @bright.fantine 5 лет назад

    Hey I'm french and I watched your video , which helped me a lot for my backend school project... You speak a little to fast but I understood almost everything I needed to haha. thanks!

  • @imagineabout4153
    @imagineabout4153 4 года назад

    Absolutely the best Alex, no doubts. I own you a lot

  • @threeone6012
    @threeone6012 5 лет назад +1

    How do I give this video 10 thumbs up?
    It deserves it.

  • @stephenkilgannon8466
    @stephenkilgannon8466 3 года назад

    From one random guy to another, Thank you. :)

  • @GamesareforEducation
    @GamesareforEducation 2 года назад

    This is the best tutorial out there.

  • @AbdelhameedG
    @AbdelhameedG 4 года назад +1

    Great tutorial , Thanks buddy!

    • @shrijaykesarwani6773
      @shrijaykesarwani6773 4 года назад

      Sir i didn't get why you use redirectHome into login POST request?

  • @ShivanshTiwari
    @ShivanshTiwari 4 года назад

    Exactly what i was looking for. Thanks Alex. Love from India

  • @kostadinvalchev1781
    @kostadinvalchev1781 4 года назад

    Thanks man! This is exactly what i looking for. Nice work!

  • @kofuku1003
    @kofuku1003 4 года назад +6

    On my recommended, Im so glad I clicked it lol
    Sub!!!

  • @coleenocks5025
    @coleenocks5025 5 лет назад +2

    At first I thought... damn!! dude has no chills at all, then with the little humour at around16:10 I was like, whew! he's human after all :) great video

  • @johnbaker2170
    @johnbaker2170 4 года назад

    thank you so much you don't know how much this helped

  • @emilgebl8644
    @emilgebl8644 3 года назад +1

    Even though I define my req.session.userId = user.id, and can console.log in the same page it works..
    But printing req.session.userId anywhere else doesnt work, it returns undefined..
    not really finding any good solutions online, I must have missed something?

  • @minitaigaamv6352
    @minitaigaamv6352 3 года назад

    RICARD, QUE GUAPO DEJAR A ESTE CHAVAL ENSEÑARNOS LO QUE TU DEBERÍAS EH, TA WAPA LA FAENA DE PROFE DEL CHILL HACIENDO TUS OTROS TRABAJOS EN VEZ DE ENSEÑARNOS EHHH.
    Np, te quiero

  • @tenminutetokyo2643
    @tenminutetokyo2643 4 года назад

    Happy new year dood!

  • @aljimsonmegrino9580
    @aljimsonmegrino9580 4 года назад

    really helpful i learn a lot today....kep it up...thanks

  • @saadhith
    @saadhith 3 года назад

    you are one of the best Sire! Thanks a very lot!

  • @sreeramkl2679
    @sreeramkl2679 4 года назад

    Checking only if a session is present rather than verifying it, wouldn't it allow people to access /home with any random value set as session id? [21:37]

    • @CodeRealm
      @CodeRealm  4 года назад

      The session ID will only be present on req.session if the session was successfully loaded by express-session. If they try sending in a bogus session ID cookie, the session won't be found (in redis, mongodb, etc.).

  • @libertad83y
    @libertad83y 4 года назад

    Thumbs up, you are a real prodigy!

  • @colin3217
    @colin3217 4 года назад +1

    I have gotten to the part at 15:00 . my req.session is undefined. Any advice?

    • @emilgebl8644
      @emilgebl8644 3 года назад

      did you fix it?

    • @colin3217
      @colin3217 3 года назад

      @@emilgebl8644 I believe it was an issue with either cookies or local host

    • @emilgebl8644
      @emilgebl8644 3 года назад

      @@colin3217 Oh, well I removed the cookie part and then it worked. Maybe that its cookie using on localhost?

    • @colin3217
      @colin3217 3 года назад

      @@emilgebl8644 yeah cookies dont work on local host

  • @awabelmahe9700
    @awabelmahe9700 3 года назад

    This was super helpful. Thanks you very much.

  • @MisterFresh022
    @MisterFresh022 4 года назад

    That's a really nice tutorial. Impressed !

  • @nadaz7333
    @nadaz7333 2 года назад

    Wow you explain very well! thanks

  • @hoobaloob99
    @hoobaloob99 4 года назад

    for your login route at 25:21 why does the response need a return, then if your login fails it just sends a regular response? when I tried it without the return it gave me an error, but with the return, it works just fine.

    • @CodeRealm
      @CodeRealm  4 года назад +1

      You don't want it to flow through and attempt a second redirect. When you preface line 121 with a return, the function (route handler) will exit and never leave the if condition.

  • @vinsmon1409
    @vinsmon1409 4 года назад

    quick and best explained tutorial.

  • @billyphuvinhhoang8429
    @billyphuvinhhoang8429 4 года назад

    thank you for sharing how session express works.

  • @SithaSek
    @SithaSek 5 лет назад

    You are the realm the real teacher, thank you!

  • @yatessnyder1490
    @yatessnyder1490 4 года назад

    26:45 How do you know that if(!exists) will execute after your line 132 const exists = users.some(...) ? I know JavaScript is asynchronous and this type of stuff trips me up

    • @CodeRealm
      @CodeRealm  4 года назад +1

      Array.prototype.some method is syncronous. You don't need to tack on a .then() or preface it with await; that's only the case for async calls.

  • @PUNTO1992
    @PUNTO1992 5 лет назад +1

    I am a simple person. See UBUNTU press like.
    Great tutorial.

  • @brycegoh9399
    @brycegoh9399 4 года назад +1

    Hey, I would like to clarify some doubts. If the maxAge is set to a timethen wouldn't the cookie be deleted by the browser even though there is user activity? Wouldn't that affect user experience? Is there some kind of best practice?

    • @CodeRealm
      @CodeRealm  4 года назад

      express-session has a rolling option to extend the expiry date on subsequent requests. You may want to be careful so as not to extend it indefinitely though; that's where the absolute timeout comes in

  • @joshuamoskovitz4074
    @joshuamoskovitz4074 4 года назад

    Wow. Perfect. A way to create a register, login, session and logout in 1 video. Just what I needed.
    I looked at your presentations on github and you go into detail on how to use redis to store a session ID. Any chance you can give a quick explanation on how to store the session ID on mongoDB? Thanks

  • @armjim1412
    @armjim1412 5 лет назад

    So glad I found this video

  • @goranqaqnass5867
    @goranqaqnass5867 4 года назад

    Thanks, Alex, that was amazing!!!!!!!!!!

  • @hk_build
    @hk_build 4 года назад

    Thank you so much for this video....let say if i save token in cookie at client shall i need to manually send it along with header OR it will be auto sent if i stored in cookie..?

  • @heunsigjo7484
    @heunsigjo7484 Год назад

    awesome tutorial. Thank you so much

  • @dewashishwankhede2478
    @dewashishwankhede2478 3 года назад

    Amazing tutorial 🤩

  • @pabloorellana7631
    @pabloorellana7631 5 лет назад +1

    You explained this really well, thank you.

  • @orhanprivacy7350
    @orhanprivacy7350 5 лет назад

    What this comment is going to do is this comment will appreciate your hard work.

  • @santosuke
    @santosuke 4 года назад

    Super useful. Thanks :)

  • @funtimecomedy1014
    @funtimecomedy1014 4 года назад

    Exactly that i was looking for..Thank you so much

  • @fleskimiso
    @fleskimiso 4 года назад

    Great tutorial on authentication.

  • @WudsyWudsyWudsy
    @WudsyWudsyWudsy 5 лет назад +1

    Great video! Is there a copy of the code available anywhere?

  • @sivakrishna0140
    @sivakrishna0140 5 лет назад

    thank u so much, I really benefitted after sean this video

  • @renaano
    @renaano 4 года назад

    Great tutorial, but I have a question. Why do you create a session ID on register? Isn't something you should do only when the user logs in?

    • @muktesh_gautam
      @muktesh_gautam 4 года назад +1

      When you register you are being logged in as well, so that after registering you dont have to go /login and give credentials there also!

    • @renaano
      @renaano 4 года назад

      @@muktesh_gautam totally understandable. But I guess in my case I shouldn't do that as I'm sending an email verification to verify that the user's email is valid :D

    • @muktesh_gautam
      @muktesh_gautam 4 года назад

      @@renaano haha yes, you should direct that user to some other page then, well i yet have discover that side of authentication! : )

  • @shrijaykesarwani6773
    @shrijaykesarwani6773 4 года назад

    I didn't get why you use redirectHome into login POST request?

  • @user-pt7tv
    @user-pt7tv 4 года назад

    Very informative, thanks!

  • @raaghavsharma378
    @raaghavsharma378 5 лет назад +3

    You Motivate ME .... Thanks man --->

  • @aldfr1336
    @aldfr1336 4 года назад

    Great explanation , thank you !

  • @sherryjain9337
    @sherryjain9337 3 года назад

    Hello Alex! Find function in the /login post method is not working in my piece of code! Can you please help?

  • @dianugroho
    @dianugroho 5 лет назад

    Great, very clear explanation!

  • @muktesh_gautam
    @muktesh_gautam 4 года назад

    Very nice tutorial, thanks a lot, i have question when does the cookie is attached with request object like when you do req.session.userId = user.id, what happens is you are setting a property for req.session is this line make the cookie sid(session id which is a big string as you explained) to be set on the document.cookie

    • @CodeRealm
      @CodeRealm  4 года назад +1

      document.cookie gives you access to non-HttpOnly cookies (i.e. those visible to JS). The cookie header itself is set by express-session shortly before the response is set out. That's what the middleware does when you mount it to the Express (app) instance.

  • @LeRustal
    @LeRustal 4 года назад

    Hi, good work doing this video :
    Had one question :
    Could the user "create" a cookie named "userId" containing a random value and be redirected to /home without having to login, since we are only checking the presence of req.session.userId , could this be a potential abuse ? (since user can send whatever they went through request right ?)

    • @LeRustal
      @LeRustal 4 года назад

      What I suggest in this case is to validate the userId with our database (here the array). But could be heavy to do so on every request so I don't know..

  • @mohsenaskari5166
    @mohsenaskari5166 4 года назад

    hi, This was a great training. Thank

  • @ittrainingclasses
    @ittrainingclasses 3 года назад

    Great Tutorial Man :)

  • @skjahir1091
    @skjahir1091 5 лет назад +1

    you have really great knowledge

  • @sergeyb6071
    @sergeyb6071 4 года назад

    this is an amazing tutorial!

  • @davidmccrea1232
    @davidmccrea1232 5 лет назад

    This was really helpful! FYI, the custom middleware redirectLogin wasn't working me for some reason. I had to use the hasOwnProperty method:
    const redirectLogin = function(req, res, next) {
    if (!req.session.hasOwnProperty.call(req.session, 'userId')) {
    return res.redirect('/account/login');
    }
    next();
    };

  • @otaruandrewomeizadaudu3680
    @otaruandrewomeizadaudu3680 5 лет назад

    How do you check the sessionID sent from the client againat the sessionID in store ? You mentioned this as middleware necessary in your introduction video on web authentication

    • @CodeRealm
      @CodeRealm  5 лет назад

      express-session _is_ the middleware that does this check among other things.

  • @Gabokor-76
    @Gabokor-76 4 года назад

    Amazing job man!

  • @burgdog
    @burgdog 6 лет назад +1

    Is it possible to use this method if I'm using a React front end that's communicating with an Express API?

    • @CodeRealm
      @CodeRealm  6 лет назад

      Sure, why not.

    • @burgdog
      @burgdog 6 лет назад +1

      @@CodeRealm I was confused by the fact that the user is making the request to React and React is making the request to the Express API, but I think I just had an "Aha!" moment, that the call to the Express API is actually coming from the client browser, so the session management should work seamlessly. Correct?

    • @CodeRealm
      @CodeRealm  6 лет назад

      Exactly. The session cookie is attached to the request by the browser when you use fetch() or XMLHttpRequest. Whether the call is carried out within a handler in React, Angular or other has no bearing.

  • @blessedandpeaceful
    @blessedandpeaceful 5 лет назад

    I am not able to find a good documentation to explain how the syntax const { PORT = 3000 } = process.env works. I know how it works semantically. But not able to understand how javascript supports this. What you are saying is if process.env has a member PORT then override PORT with that value or default it to 3000. But PORT is declared as a const and process.env is an associate array aka an object. How does js understands to convert this with this succint syntax ? Also instead of just a constant I want to create an object which I can export outside, how to do that ?

    • @CodeRealm
      @CodeRealm  5 лет назад

      You destructure PORT out of process.env object and assign a default argument in case it's undefined (i.e. either the property doesn't exist or it's intentionally set to undefined, most likely the former). You can export it by writing the export keyword in front.

  • @birdofhermes6152
    @birdofhermes6152 4 года назад

    Thank you this was helpful

  • @bsherrh4916
    @bsherrh4916 5 лет назад

    Thank you for this very useful one!

  • @Roshen_Nair
    @Roshen_Nair 3 года назад

    Continue watching at: 21:06

  • @dhuber666
    @dhuber666 6 лет назад +1

    Hi, tutorial is awesome as always. One question:
    What if I have a react application and want to authenticate to the /login route using axios?
    I would send a post request to the /login route with the email and password in the body right?
    Then I get a response from the server including the cookie, right? And this cookie is somehow stored somewhere in browser? Or do i have to store the token in the application's state and send it as header for following requests?
    After I'm authenticated and I want to fetch, let's say some posts from the server with /posts, I have to include the cookie in the headers?
    Another one:
    We created a lifespan of 2 hours. What is when these 2 hours passes. I have to login again on the client side, right?
    Last one:
    In which part of the code does the server check if the client's cookie is valid? We just look if the user was found in the mock db and then attach an id property to the request object? So the user get's authenticated just with that id prop in the cookie? Sorry long time that something was soo complicated to me :D Maybe you can guide me into the right direction. Looked up other videos too but I'm not getting it :D
    Awesome stuff man :)

    • @CodeRealm
      @CodeRealm  6 лет назад +4

      Once the browser receives a 200 OK with a Set-Cookie header, it will take care of storing the cookie. You can track it with JS via document.cookie or if it's HttpOnly, using a browser extension like EditThisCookie. Once stored in the browser, the cookie is automatically sent along with each request via the Cookie header.
      Once the cookie expires, the browser deletes it, and it's no longer sent to the server, so the user has to re-login. This is where you need to play with expiry time, as 2 hours might be too short. Alternatively, when the client makes calls to the API, you could extend their session, optionally checking if it's about to expire soon. "Soon" can be a slippery slope though. So, the question really becomes, how far in time would you allow to stretch the session, and how often can it be extended? Because a bot could log in to the system and continuously ping the server, thereby indefinitely extending its session lifetime. API throttling becomes a must in that case.
      The cookie is validated by express-session middleware. Once applied to an Express instance, it will inspect each incoming request for a session cookie. If present, the cookie is verified with a secret, and its ID is matched against the session store. If a match is found, the library injects the session object in req, including all data that was stored in it. So, following this video, you could do for ex.: req.session.userId. If a session is matched, you'll get a valid ID, but if it couldn't be found, you'll get undefined. That's how you know if they're still logged in.
      If you use connect-redis, sessions are stored using SETEX, meaning they auto-expire after maxAge. So, if the user tries the same cookie after it's expired (via cURL for example), the session simply won't be found, as it will have been deleted from the cache by that time. In other words, you'll get undefined for req.session.userId. This is true for external session stores, like connect-redis, connect-pg-simple, etc., i.e. the ones you'd use in a real site. The default in-memory store seems to auto-extend session expiry date on repeated requests to the server... Don't use it in production!
      Not at all, I loved your questions, Dominik! I'd also suggest you check out the Auth video ruclips.net/video/2PPSXonhIck/видео.html especially the first part about sessions and cookies. Hope this brief essay helps, lol. Cheers!
      Alex

    • @dhuber666
      @dhuber666 6 лет назад +1

      @@CodeRealm Hi Alex. Thank you so much for the detailed explanation on this topic. I get it now. I also testet around with postman and a client with axios. I fully understand it now and I'm now feeling that I have more control over my auth flow comparing it to passport (where passport does everything for me).
      I already watched the tutorial it's awesome as ever. I also starred the github repo with the documents.
      Thx Dom

    • @benogidan
      @benogidan 6 лет назад +1

      @@CodeRealm what about for Postman requests how does that work and can you access the cookie from your client after logging in

    • @CodeRealm
      @CodeRealm  6 лет назад +1

      @@benogidan For Postman, you'd need the interceptor, so as to share the browser cookies. You could install it as an add-on extension in the past, but now that they migrated to a desktop app, I'm not sure if it was ever re-developed. Last time I checked (2017-ish?) it still wasn't out. On the client, you can use EditThisCookie

    • @CodeRealm
      @CodeRealm  6 лет назад

      Actually, you might not need the interceptor, now that I think about it. As long as you attach the "Cookie" header with the session ID from the server, you'd be able to authenticate.

  • @hikre8308
    @hikre8308 5 лет назад

    thanks for the video, it helps a lot
    waiting for the next tutorial!

  • @biswayannandi6136
    @biswayannandi6136 2 года назад

    this video was greatly comprehensive but I think if you write less code, show the output and then proceed then it will be much better...thank you!

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 6 лет назад

    Thank u for this awesome video and series