Saturday, 16 March 2019

Mongoose schema for multi login?

Hello,I have seen this schema for having multiple types of logins; Is this the most common pattern? Or is there a better way? Thank you in advance.var userSchema = mongoose.Schema({ local: { email: String, password: String }, google: { id: String, token: String, email: String, name: String } //twitter { }, //facebook {} });​

Submitted March 16, 2019 at 05:49PM by dejavits

No comments:

Post a Comment