Creating and persisting a Login session - Node.js Tutorial 18

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Best express-session tutorial all over youtube. Seriously, I've watched like 15 videos about it, and this is the simplest and easiest one. Congratulations!

edy
Автор

Been searching for answer for the problem about req.session.user value is undefined and i finally it got the the answer for my problem,
one of the reason why the session is undefined is you need to make sure the order for the middleware in your app where comes first before the app.use(router) so that the router can execute the session middleware ...



app.use(router);


i hope it can help you guys ! cheers!

eloisevincentmamac
Автор

Took me a long time to figure out, but if you have the problem that your req.session.user value is undefined outside the function. Add this code:

req.session.save(function (user) {
// session saved
})

coenmathijssen
Автор

Dude your tutorials absolutely bang dude. Jheeze if only I discovered this earlier

cherriepie
Автор

Appreciate the tutorial because there are like no resources online for what I was looking for until I found this!

androidcaiteen
Автор

AMAZING content thank you this finally makes sense now

Supakills
Автор

Impressive that you were able to do this entire tutorial while scuba diving and I didn't hear ANY bubbles. ;)

sincitycyclops
Автор

thanks, very clear implementation, managed to make my webapp work. you da man

johnson
Автор

thanks that exactly what I was searching for, very basic and understandable!

emerlenderz
Автор

this is exactly what I've been looking for <3 thanks

jakub
Автор

really nice and pretty simple tutorial!!)) Thx, man!! doing that way!

yevheniiherasymchuk
Автор

Really good tutorial, just a shame the audio quality is so poor

QuadFilmProduktion
Автор

req.session.user = user error, Any good solution! @manthan Dave

robertbato
Автор

Hii ... I want to logout the user automatically if in case of inactivity for 5-10 minutes ... can u help me in this ... I need urgent help ... I m new to node js ...

svmarvind
Автор

Hi Manthan, how session id stored on the client side and how to pass it to server. From postman if i want to fire two different post request for dashboard from two different clients both can see there dashboard..

albaford
Автор

Req.session.user = user dont work . Help me !!

ngocduyo
Автор

In this example you are not persisting the session. Title of video is misleading.

adamjones
Автор

in my project it is not working.
at the login form i used action: "/dash" POST
there I set req.session.user in a promise.
after this I write res.redirect("/dash") GET
Here I checked req.session.user and get undefined value.
have you any idea.

mukundpatel
Автор

Hi, how can i get the source code? thank you

tumarisyalqun
Автор

yei I have the same wallpaper, I love koansound :3

EdRawrDev