1

accounts-google ログイン サービスで Meteor 1.0 を使用しています。

これらの許可をリクエストします

requestPermissions:
  google: [
    'https://www.googleapis.com/auth/calendar',
    'https://www.googleapis.com/auth/userinfo.profile'
  ]

ログインに成功した後、サーバー上の Mongo シェルでユーザー オブジェクトを見ると、ユーザー ドキュメントのどこにも電子メールが表示されません。

Meteor は、Google へのログインに使用されたメール アドレスをどこかに保存するという印象を受けました。

メールを受け取るにはどうすればよいですか?

4

2 に答える 2

2

どうやら私は許可を求める必要がありました:

"https://www.googleapis.com/auth/userinfo.email"

今では動作します。

于 2014-10-29T05:37:44.360 に答える
1

メールフィールドをクライアントに公開しましたか?

if (Meteor.isServer) {

    Meteor.publish('', function () {
        if (this.userId)
            return Meteor.users.find({ _id: this.userId }, { fields: { services: false } });
        else
            return this.stop();
    });
}
于 2014-10-29T03:42:32.830 に答える