我有这样的架构:
username: String,
authData: socialNetworkName: {
access_token: String,
expiration_date: Date,
id: String
}
使用它的例子:
"name" : "Ilya",
"authData" : {
"fb" : {
"access_token" : "ECBAI3easd64T4dEokBaANN",
"expiration_date" : ISODate("2017-02-01T18:55:07Z"),
"id" : "4314342324242424242"
},
"twitter": {
"access_token":"fdfkdlfdfdfkdl",
"expiration_date":ISODate("2017-02-01T18:55:07Z",
"id":"343243434"
}
},
如何在fb
中访问authData
以更新访问令牌而不更改'twitter'?