How to add fields to the Meteor.users collection

前端 未结 2 480
星月不相逢
星月不相逢 2021-02-10 04:27

I want the Facebook accessToken that is stored in my user\'s document on the client. Following the meteor documentation, I should just add a new publish call.

In

2条回答
  •  没有蜡笔的小新
    2021-02-10 05:09

    You can publish the field you want:

    Meteor.publish( null, function() {
      Meteor.users.find({}, {fields: {profile: 1, username: 1, ...}})
    }
    

提交回复
热议问题