Changed tokens from an object of objects to just an array, Tumblr strategy now pushes a new token in addition to tokenSecret as well as token kind

This commit is contained in:
Sahat Yalkabov
2013-12-07 02:17:46 -05:00
parent cbc9ec3506
commit c03d62da08
3 changed files with 11 additions and 10 deletions

View File

@ -8,6 +8,7 @@ var userSchema = new mongoose.Schema({
password: String,
// OAuth 2.0 authentication
tokens: Array,
provider: String,
facebook: String,
twitter: String,
@ -22,17 +23,10 @@ var userSchema = new mongoose.Schema({
location: { type: String, default: '' },
website: { type: String, default: '' },
picture: { type: String, default: 'http://bit.ly/1cppDAL' }
},
}
// API access tokens
tokens: {
google: String,
facebook: String,
foursquare: String,
twitter: String,
github: String,
tumblr: String
}
});
userSchema.path('password').validate(function(password) {