User authentication and login is the most important feature of many websites, and most likely a key component to your next project. In this video I will be covering absolutely everything you need to know about user login and authentication in the most concise and simple way. We will be using Express for our server backend and Passport to help us manage the logged in state of users. We will also be sure to properly encrypt and hash all user passwords so that our application is completely secure. By the end of this video you will have built a fully functional login system that you can use in any of your future projects.
📚 Materials/References:
GitHub Code:
Full Stack Node.js MongoDB Free Course:
Node.js Authentication Tutorial:
🧠 Concepts Covered:
– Setting up a server with Node.js and Express
– Setting up Passport with Node.js and Express
– How to encrypt user passwords
– Restricting access to routes to only logged in users
– Showing flash messages with Node.js and Express
🌎 Find Me Here:
My Website:
Patreon:
Twitter:
Discord:
GitHub:
CodePen:
#PassportLogin #WDS #NodejsLogin
Nguồn: https://taiduc.org
Xem thêm bài viết khác: https://taiduc.org/the-thao/
Xem thêm Bài Viết:
- User Authentication in Node.Js Using Passport.js (passport-local)
- Vật Vờ| Mở hộp & đánh giá nhanh Samsung Gear S2: siêu đẹp, hiện đại, mượt mà
- Mình mua một đôi giày bóng rổ cực ngon chỉ để đi bình thường, giá 1.x
- FORD ECOSPORT 2014 SIÊU ĐẸP- XE Ô TÔ CŨ GIÁ RẺ
- 6 APP CHỈNH ẢNH yêu thích của Emmi & cách sử dụng |FAVE PHOTO EDITING APPS | Đẹp mặn #10| Happy Skin
Is the code for this simple project somewhere. I seem to be having issues getting my user by email after registering and can't figure out why
What's passport?
Passport authentication starts at 15:00
when execute a node server.js then I have got this error "Error: secret option required for sessions"
What should I do?
How can I set file association of ejs files to "Embedded Javascript"? It is set to html by default but html doesn't understand the ejs formatting. I tried to find "Embedded Javascript" online but couldn't. I'm making do with some other ejs language support extension for now but I'd like to know how to get the one you have. Thanks!
Hey thanks for th great content! However, Im a little confused as to why you use DELETE for logout and not POST. The general practice is to use POST right? Since we are not technically "deleting" anything.
I dont see the point of using node.js… hosting companies dont run nodejs
I like your video. But it just bothers me so much that you don't use semicolon. Hahaha
I just have switched from php to node js for 2 weeks. Your training is first class. Very helpful. THANK YOU VERY MUCH.
Not a single semicolon SMH
Hi Kyle…The tutorial is very helpful to me…I'm just a beginner to this.. Thank you… oh..hey how can I convert (Users array) into Nedb… Thank you again..
I really did not enjoy this video as opposed to the JWT authentication one for example. I felt that you moved too fast through a lot of concepts when you started using the passport and passport-local modules. For example, what is a local strategy? It would've been nice if you'd explain the concepts a bit before starting to code
I really liked this tutorial – thank you!
this makes me the good kind of confused
Whats that serialize thing for?
some react + passport + db would be nice
Hello Kyle, one question please:
you load the .env only for non-production environments, why doing so ? Don't we have to have a secret even in production ?
thanks.
I agree with many, he is really good and to the point.
Hy, actually I am having a TypeError at req.isAuthenticated().
Can you help with this.
i have absolutely no idea can overwrite that method in action
You're a superhero and a wonderful human being.
if someone has problem with "npm i bcrypt" use "npm i bcryptjs" instead
nice… but one suggestion your speed is so fast and you did not explain anything you just speak and write code with nonstop. you can improve it
Thanks for your work, you solved 2 my proplems , auth and CRUD, You really good teacher
Once again…best channel for web development….just as the name indicates.. simplify the web….thanks for the content…
And the best part is short videos…no 5 hr long tutorial…
Straight to the process with just simple explanation…and no.style
Best channel…even better than traversy..
I come from Vietnam. Thank you very much!
awesome kyle, keep doing these videos good luck
but what about restore password, sending email notifications by google email, etc?
If you already have a login form setup with html and css, how would you get that to work instead of using ejs
11:10 – Installing bcrypt
14:39 – Installing passport, passport-local, express-session, express-flash
nice tutorial dear. do you have any vuejs tutorial that works on a project from scratch?. working on a project helps the application of every language.
"and for some reason if we do found the password", LOL
This is exactly what I needed, but because he isn't storing the information to a DB, it makes it a little difficult to implement.
Can we use passport for app made with flutter???
you are the best
Finally a video that I follow to completion without errors. Thanks
bcrypt installation sucks !!
flash messages don't appear, why is this?
Use sessid for managing session for express.js…. best part is it is synchronise