How do server side authentication sessions work (express & cookies)

  Рет қаралды 32,858

Web Dev Cody

Web Dev Cody

2 жыл бұрын

A walkthrough on how server side authentication sessions work using cookies.
------------
🔔 Newsletter eepurl.com/hnderP
💬 Discord / discord
📁. GitHub github.com/codyseibert/youtube

Пікірлер: 48
@aissa.bouguern
@aissa.bouguern Жыл бұрын
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!
@Goofy8907
@Goofy8907 2 ай бұрын
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.
@user-wj7gz8dd8b
@user-wj7gz8dd8b Жыл бұрын
You sir deserve all the support, thank you so much, you pretty much saved me time. Great work
@marksheard1210
@marksheard1210 4 ай бұрын
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.
@kosidinna_
@kosidinna_ 2 ай бұрын
i know i'm late to this but as someone who is just getting round to backend stuff, this was very useful. Thank you
@mayor3367
@mayor3367 Жыл бұрын
Thank you so much. I had a hard time understanding how jwt does what it does. It is so much clearer now.
@SkySentry7
@SkySentry7 29 күн бұрын
TYSM man. I've been struggling trying to understand how sessions work with cookies
@GilP-BM
@GilP-BM 2 ай бұрын
Love your content & input, thanks Cody!
@exe.m1dn1ght
@exe.m1dn1ght 10 ай бұрын
I love this explanation ! thanks Cody !
@SeibertSwirl
@SeibertSwirl 2 жыл бұрын
Great job babe!!! You’re killin this!
@cristianadejola464
@cristianadejola464 Жыл бұрын
Currently working same subject but with SQL database. Bit complicated and stressful. But your tutorial help a lot. Thanks ones again
@bentheafrican
@bentheafrican 2 жыл бұрын
Nice tutorial Looking forward to watch the next one.
@raprincis
@raprincis 4 ай бұрын
Simple, helpful, and very instructive
@devnarula6733
@devnarula6733 Ай бұрын
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!
@mferino1960
@mferino1960 Жыл бұрын
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.
@user-sz4gp6oc2n
@user-sz4gp6oc2n 6 ай бұрын
appreciate dumming down the complex concept
@Gamer-gw6nj
@Gamer-gw6nj Жыл бұрын
Simply put together
@digvijaysingh6882
@digvijaysingh6882 10 ай бұрын
simple and thorough. Glad you didn't use all those fancy abstractions.
@CoryTheSimmons
@CoryTheSimmons 3 ай бұрын
Best tutorial I've ever seen.
@cristianadejola464
@cristianadejola464 Жыл бұрын
just subscribe to your channel. you are really helping the junior Dev. Thanks so much
@offgridvince
@offgridvince 4 ай бұрын
Great video! Thx
@JoelGrayson
@JoelGrayson Жыл бұрын
Thank you for the simple explanation. Helped me a lot. Tip: res.clearCookie() does the same thing as res.set('Set-Cookie', `session=null`)
@bitsplode
@bitsplode Жыл бұрын
whats the difference? Number one wipes the cookie out of existance and number 2 just null-ifies it???
@jperusm
@jperusm 4 ай бұрын
@@bitsplode that is correct. number two will just "modify" the cookie value but will not delete it.
@alexvolkov529
@alexvolkov529 Жыл бұрын
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?
@tljstewart
@tljstewart 7 ай бұрын
Great content
@alexdonoaga89
@alexdonoaga89 10 ай бұрын
whats the extension name for copilot that you used to recive the delete cookie thing ?
@lightsinvalues9856
@lightsinvalues9856 Жыл бұрын
thank you very much
@meepk633
@meepk633 9 ай бұрын
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.
@sjfieksnd
@sjfieksnd Жыл бұрын
Cool!
@notfadeaway6617
@notfadeaway6617 9 ай бұрын
nice video
@codinginflow
@codinginflow Жыл бұрын
Can you tell me what's this VS Code theme? It's beautiful
@WebDevCody
@WebDevCody Жыл бұрын
I think this is material community high contrast
@codinginflow
@codinginflow Жыл бұрын
@@WebDevCody Thank you
@blackpeep984
@blackpeep984 Жыл бұрын
shades of purple
@codinginflow
@codinginflow Жыл бұрын
@@blackpeep984 That's what I thought actually
@blackpeep984
@blackpeep984 Жыл бұрын
@@codinginflow it's my personal favorite so i knew right away what theme he's using
@velara314
@velara314 Жыл бұрын
If I need to authenticate across two different domains should I use Jwt or sessions?
@WebDevCody
@WebDevCody Жыл бұрын
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
@ponderatulify
@ponderatulify Жыл бұрын
How do you go about storing the session? Removing the session? How does it scale?
@tudor14
@tudor14 Жыл бұрын
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...
@captainalpha4853
@captainalpha4853 Жыл бұрын
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.
@WebDevCody
@WebDevCody Жыл бұрын
If you’re using axios or fetch you usually have to specify withCredentials true for all your requests
@bamideleprecious3481
@bamideleprecious3481 10 ай бұрын
What plugin can I use
@WebDevCody
@WebDevCody 10 ай бұрын
Material community
@brianpolly-ei3nk
@brianpolly-ei3nk 5 ай бұрын
Are you on telegram
@ashajanet12-a92
@ashajanet12-a92 Ай бұрын
This is wayy good explanation!🫴✨
Session Authentication in Express
40:43
Code Realm
Рет қаралды 145 М.
Difference between cookies, session and tokens
11:53
Valentin Despa
Рет қаралды 582 М.
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 40 МЛН
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 2 МЛН
ТАМАЕВ vs ВЕНГАЛБИ. Самая Быстрая BMW M5 vs CLS 63
1:15:39
Асхаб Тамаев
Рет қаралды 3,7 МЛН
Learn Express Middleware In 14 Minutes
14:48
Web Dev Simplified
Рет қаралды 385 М.
Serverless might bankrupt you (and how to deploy to a VPS instead)
14:26
Cookies, Sessions, JSON Web Tokens (JWT) and More 🍪🔐
46:41
LearnWebCode
Рет қаралды 103 М.
JavaScript Cookies vs Local Storage vs Session Storage
14:28
Web Dev Simplified
Рет қаралды 727 М.
Token vs Session Authentication | Authentication Explained!!!
15:19
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,1 МЛН
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 40 МЛН