Sessions in Node #2 | Authentication in Node.js with Express and sessions | authentication in Node

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


This video is part 2 of our series in which we start implementing our cookie-based authentication system with sessions.

00:00 - running Redis locally
04:46 - Setting up express session server
06:13 - wiring up our server with our redis store with connect-redis
07:00 - configuring Redis driver
08:12 - configure express session middleware
10:02 - session cookie settings
11:09 - HttpOnly cookie setting
11:47 - setting maximum age of the cookie
Рекомендации по теме
Комментарии
Автор

As of recently Chrome and other browsers expect the SameSite attribute in cookies to be at least lax (or strict).
That's why I would recommend adding the sameSite attribute to the cookie configuration in your session middleware.
Like so you can make sure that your session implementation works for pretty much any browser

jgoebel
Автор

The best series about sessions for front end developer)

shamil_mammadov
Автор

Amazing man
keep this wonderful work on !

ahmedelgaidi
Автор

Hey, I would like to clarify some doubts. If the maxAge is set to 30mins then 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 practise?

brycegoh
Автор

hello sir, redis is not installing on windows, so what should i do?

ShivShankar
Автор

is there any connection/relation between const RedisStore(comes from connectRedis(session)) and new RedisStrore(declared in app.use session store). Thanks in advance.

candycoloredvideos
Автор

Great viode, but would have liked to work with redis native data types and some library which acts as redis client. This doesnt give any idea on how and where the sessions are stored - hash, string, set?

sariksiddiqui
Автор

I tried with the same code... it's getting error... need this help ☹️

gauthaml
Автор

Good video but editor font size is too small

AbdelhameedG
Автор

I'm the only one who gives the thumbed down
why need secret? -1
no redis install etc for linux -1
need voulumn -1

blue_name_warrior
join shbcf.ru