OAuth (Passport.js) Tutorial #11 - Making a User Model

preview_player
Показать описание
He gang, in this Oauth Passport tutorial I'll show you how we can create a User model using mongoose. We can use this model to save our users to mongodb.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
Other tutorials:

----- NODE.JS TUTORIALS

----- MONGODB TUTORIALS

============== The Net Ninja =====================

================== Social Links ==================

Рекомендации по теме
Комментарии
Автор

As you said -> The best OAuth tutorials on the planet :)

保険太郎-gh
Автор

Hi, thank you for this wonderful course.
Quick question. In the User schema you are storing googleId. Question .... what is the best way to handle a real-world scenario where multiple social identity providers are configured as strategies in passport. Not all of them will provide string based unique id. What would you recommend ?

PublicUser
Автор

Why do you get the beautiful material design authentication page when I get the ugly one which says "login with Google" above the card in an ugly small container with little to no padding at all?

dustbinsavesyou
Автор

new User({
username: profile.displayName,
googleId: profile.id,

}).save().then((newUser) => { // recoder
console.log('new user created: ', newUser);

});

I have no idea why where is wrong in this code, user id and username cannot show up in my mongodb. Does anyone have opinion? thanks

zhouwen
Автор

convention is to use capital letters for constructors, so there is no convention for Schema and User

pashabiceps
Автор

Taking too much time in this video as this tutorial is not for beginners. Developers watching should at least know passport-local to follow up with this tutorial so they should know about mongoose and schemas

GEEKLEAK