Integrating Express-Session and Passport.js | Node Auth Tut - Part 5

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


We know sessions are a place in which we can store data on our app's backend. We also know that session packages typically return to the user a cookie that associates them with their corresponding session. However, what we don't know is how to use a session to "log a user in" to our app.

Video Timeline:
---------------
00:00 - Installing express-session
07:26 - Adding a login function to user registration
15:18 - Viewing session authentication data in the console
16:00 - Why we need to add session storage to our database when developing

The Platform:
-------------

Each course tells a different story, and each milestone reveals a different scene. With an expansive universe to explore, you can track your progress, and gain the necessary skills needed to build your dreams.

Support Chris Courses Through Patreon:
--------------------------------------

Chris Courses Social:
---------------------

Christopher Lis Social:
-----------------------

Beats:
------
Joakim Karud - Looking To The Sky w/Peter Kuli & Kasey Andre
Рекомендации по теме
Комментарии
Автор

You have no idea how many tutorials I read and watched about authenticating users in MySQL DB. This is awesome!!!

manolete
Автор

- Uses semicolons liberally
- Explains things clearly
- Doesn't take a million years to complete the demo

You're a legend!! Great vid!

liamtubsy
Автор

I am sitting at my internship and it's been 5 hours now since I started my unsuccessful search of finding a way to authenticate users using passport and MySQL. You are an angel. God bless you.

dawoodmuzammil
Автор

Absolutely Great!! I generally don't comment on youtube videos but u have made an outstanding video, everything taught in detail and from scratch. Definetely the best video on security and authentication going around

rohansinha
Автор

Great series, and awesome efforts. I really appreciate it,
Anyone has an issue with webpack versions, just ignore it. Understand the concept and apply it however you want on your project
this thing is really awesome. Thanks Chris :)

abdulrhmankhallil
Автор

Hey chris! Your courses so far have been so immensely helpful I can't even put it into words. Thank you so so much for making such a clear and well composed lesson for us on youtube :)

Nnexxxx
Автор

I spent so much time trying to figure out why it doesn't work and after finding your video I finally got it to work. Thank you very much!

MrSasukeUchihaEMS
Автор

Very well explained, when i arrived, i had no idea of how to use node js, thank you!

pasionxbox
Автор

8:36 You actually don't need to make another insert query here!


The response fro the INSERT query will contain the ID of the row it inserted, you can skip the second query and just use "results.insertId" to get the ID of the user.

mattbanak
Автор

How do you not have more subs? I love how you take us to the documentation when walking through setup of packages. So helpful!

antonypetras
Автор

Thank you very much, this is a great tutorial.

eyadshami
Автор

excellent tutorial! minor point though, passport.login takes the user object so user_id isnt semantically correct

shemleong
Автор

Hi, great video. I am having a problem with express-session while using with passport in cross-domain. Do you have any idea how can I maintain persistent login session in cross-domain, using express-session? Thanks.

arpitmeena
Автор

in my chrome the are not formed....any one have any idea...pls give it to me

manishpandey
Автор

HI ! great tutorial. I wonder how to handle cookie session when you have the front in one port and your backend in other. I guess the session are not persistent. Thanks and great tutorials !!

MarcoFeregrino
Автор

Great tutorial. Will you be releasing the next episodes soon? also do you think you could make the code available, it would really help me

hardtekpt
Автор

chris...where should we add the condition to check if username or email is already taken ? ... i am confused related to this

parasarora
Автор

great! can't wait for the next one
btw can you do a video on contentful?

migom
Автор

What causes passport to break if the session is configured with cookie: { secure: true } is enabled. the connect.sid is gone.

lightwavelibrary
Автор

Hey Chris, I was wondering if you can create a simple Node Authentication using passport-oauth2??..

TheKNdheeraj