I really like how you explained sessions without relying on "express-session" or any third-party library that abstracts the work done behind the scenes. This helps beginners to adopt a nice and very simple mental model about what sessions are about. Thank you so much!
DUDE, this is how you explain something Very well done, I just came from another video on the same topic, watched the whole thing and was still clueless. Watched your video for like 3 minutes and had most of my questions answered, kept watching because of how well you explained. Thank you, I'm subscribing.
exactly what I was looking for, appreciate such low level bare-bone session auth for understanding instead of just using some plugin which teaches no one anything!
Awesome stuff, Thank you Cody!!! I have been using passport-local and figuring my way round. I highly recommend going through THIS BASIC overview before leaning on other modules\packages like passport-local and express-session.
I learned today that you can use the 'public' and 'private' keywords in TypeScript constructor parameters to auto-assign them. You don't even need to list them as members. It just adds them to the instance automatically. This is completely unrelated btw. Just wanted to share.
Great video, thanks so much! I am about to build something using remix-auth (which is my first ever auth implementation) and wasn't clear on the cookie / session relationship. Most of the things I found just by browsing the web were like, the session is stored on the server and the cookie is stored on the client... thanks, that helps me not at all. This video cleared it all up and I now have a working mental model.
Hi! Thank you for your video! I have a question how I can store sessionId on my frontend in production?Just using the domain attribute does not work since I'm using a free hosting wich is the Public Suffix List and after all frontend and backend are hosted on different subdomains. Should I store sessionId on the front-side? Or is it not the case?
Hello, I'm using express-session package. When i log in, i see that there is a cookie in the response. However, when i try to make a new request to the server, I don't see the cookie in the request header. PS: I'm using Nuxt3 for client side.
I think jwt might be easier. sessions usually use cookies which often suggest same-site policies. I'd have to research this question to be honest., but google single sign on approaches
You could store the session in Redis and other user info too (but the session ID is only sent back in cookie). Removing the session you'd just find the session based on sessionId in your store/database and delete it.. And for scaling well lets just say you're on your own there...
I really like how you explained sessions without relying on "express-session" or any third-party library that abstracts the work done behind the scenes.
This helps beginners to adopt a nice and very simple mental model about what sessions are about.
Thank you so much!
DUDE, this is how you explain something
Very well done, I just came from another video on the same topic, watched the whole thing and was still clueless.
Watched your video for like 3 minutes and had most of my questions answered, kept watching because of how well you explained.
Thank you, I'm subscribing.
Cody, that was beautifully explained.
The note you added at the end about why JWT would be useful is a gem. Subscribed.
Direct to the core, no BS content! Thanks!
exactly what I was looking for, appreciate such low level bare-bone session auth for understanding instead of just using some plugin which teaches no one anything!
Thank you for the simple explanation. Helped me a lot.
Tip: res.clearCookie() does the same thing as res.set('Set-Cookie', `session=null`)
whats the difference? Number one wipes the cookie out of existance and number 2 just null-ifies it???
@@bitsplode that is correct. number two will just "modify" the cookie value but will not delete it.
TYSM man. I've been struggling trying to understand how sessions work with cookies
Awesome stuff, Thank you Cody!!!
I have been using passport-local and figuring my way round. I highly recommend going through THIS BASIC overview before leaning on other modules\packages like passport-local and express-session.
You sir deserve all the support, thank you so much, you pretty much saved me time. Great work
i know i'm late to this but as someone who is just getting round to backend stuff, this was very useful. Thank you
Currently working same subject but with SQL database. Bit complicated and stressful. But your tutorial help a lot. Thanks ones again
Thanks!
Thank you!
appreciate dumming down the complex concept
Best tutorial I've ever seen.
Thank you so much. I had a hard time understanding how jwt does what it does. It is so much clearer now.
simple and thorough. Glad you didn't use all those fancy abstractions.
Simple, helpful, and very instructive
Love your content & input, thanks Cody!
Nice tutorial
Looking forward to watch the next one.
Great job babe!!! You’re killin this!
I learned today that you can use the 'public' and 'private' keywords in TypeScript constructor parameters to auto-assign them. You don't even need to list them as members. It just adds them to the instance automatically. This is completely unrelated btw. Just wanted to share.
I love this explanation ! thanks Cody !
Great video! Thx
Simply put together
Great video, thanks so much! I am about to build something using remix-auth (which is my first ever auth implementation) and wasn't clear on the cookie / session relationship. Most of the things I found just by browsing the web were like, the session is stored on the server and the cookie is stored on the client... thanks, that helps me not at all. This video cleared it all up and I now have a working mental model.
Hi! Thank you for your video! I have a question how I can store sessionId on my frontend in production?Just using the domain attribute does not work since I'm using a free hosting wich is the Public Suffix List and after all frontend and backend are hosted on different subdomains.
Should I store sessionId on the front-side? Or is it not the case?
Can you tell me what's this VS Code theme? It's beautiful
I think this is material community high contrast
@@WebDevCody Thank you
shades of purple
@@blackpeep984 That's what I thought actually
@@codinginflow it's my personal favorite so i knew right away what theme he's using
just subscribe to your channel. you are really helping the junior Dev. Thanks so much
whats the extension name for copilot that you used to recive the delete cookie thing ?
Great content
Hello, I'm using express-session package. When i log in, i see that there is a cookie in the response.
However, when i try to make a new request to the server, I don't see the cookie in the request header.
PS: I'm using Nuxt3 for client side.
If you’re using axios or fetch you usually have to specify withCredentials true for all your requests
If I need to authenticate across two different domains should I use Jwt or sessions?
I think jwt might be easier. sessions usually use cookies which often suggest same-site policies. I'd have to research this question to be honest., but google single sign on approaches
How do you go about storing the session? Removing the session? How does it scale?
You could store the session in Redis and other user info too (but the session ID is only sent back in cookie). Removing the session you'd just find the session based on sessionId in your store/database and delete it.. And for scaling well lets just say you're on your own there...
thank you very much
can u provide the code?
Cool!
What plugin can I use
Material community
nice video
Are you on telegram
This is wayy good explanation!🫴✨
Great content