OAuth (Passport.js) Tutorial #16 - Cookie Session

preview_player
Показать описание
Hey gang, in this OAuth tutorial I'll be showing you how we can set up our application to use cookies, using the node package - cookie-session. And how to tell Passport we'd like to use cookies to cntrol our authentication flow.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
Other tutorials:

----- NODE.JS TUTORIALS

----- MONGODB TUTORIALS

============== The Net Ninja =====================

================== Social Links ==================

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

this is from 5 years ago and works perfectly, thank so much, and thanks for not made videos overwhelming, seeing that they don't are more than 10 minutes it's a relief.

hernanborrajo
Автор

As you said -> The best OAuth tutorials on the planet :)

保険太郎-gh
Автор

You make FANTASTIC videos. I don't think cookie-session is compatible with the latest passportjs 0.6.0 anymore :(

seanlynch
Автор

Ohhh that answered my last question xD Thanks man!

oinSquares
Автор

That cookie--key though :) :) :) #loveYourShitt

sacquer
Автор

How does passport know to use this particular session and not any other?

alizeaiter
Автор

Hey you miss a link to playlist in the channel, just letting you know!

huh_wtf
Автор

Coming from a PHP background i feel like Node Express way of cookies and sessions is unnecessarily complex

abdullahmoiz
Автор

so is it correct that, deserializeUser is now a middleware that is going to be fired on every request received from any browser? Does that make it very slow?

schwarzkelloggs
Автор

Hi, I am using LocalStrategy and i have my front in one port and my backend in other. But deserialize is not working how do you handle this ? i enable cors but req.user still null.

MarcoFeregrino
Автор

did something change? i tried everything. even using your code now completely but it will not save the cookies. everything works. apart from the cookie session thing. it constantly reinitializes the authentication process.

Mtojay
Автор

Does this work in production? Like if this was hosted on Heroku.

Asmrnerd
Автор

Hello guys
Could someone help me out below :
The passport.session will be created for the encryped but how cookieSession value which is key:"thenetninjawebsite" which was present from keys folder has been encrypted there is not a way I guess that I mean keys.sessions.cookieKey was a mere string and not encrypted or is it the way that passport.session creates sessionCookie, If yes then what is the use of cookieSession?
Please help me to understand this.

dmcwuee
Автор

Why do we need to use cookie-session additionally when passport is already handling login and logouts with req.login() and req.logout()?

thespeeches
Автор

Instead of using cookie session is it possible to incorporate jwt

willzfrank
Автор

Is this safe? What if I gain access to a users id (stored in the mongodb)? Can I use it to somehow login with his account?

cedric_ds
Автор

I need help guys, I tried this using Facebook strategy but I struggle when it comes to cookie session. My problem comes when I try to redirect to profile route, I find an empty object but with Google strategy I get a user object.

Peekaymaja
Автор

This does not work with me, the server is reanitilize constantly

SirGNPBraz
Автор

Express-Session will do the same work as Cookie-Session, am i correct ?

ivanpln
Автор

I didn't undersatnd this Done, would you please explain sir?

ashutoshdwivedi