Differential / meteor-boilerplate

Boilerplate meteor app - starting point for meteor apps

Home Page:http://github.differential.com/meteor-boilerplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How enable social login on `Signin`?

bySabi opened this issue · comments

Need enable login account for:
Login with Google+
Login with Twitter
Login with Facebook

I can figure out this.
Thanks

Solved!.
for incomers like me.
1- add meteor packages:

# meteor add accounts-google
# meteor add accounts-facebook
# meteor add accounts-twitter
# meteor add service-configuration

2- add service configuration Ex: /server/accounts/config.js

Meteor.startup(function() {
  // Add Facebook configuration entry
  ServiceConfiguration.configurations.update(
    { service: "facebook" },
    { $set: {
      appId: "xxxxxxxxxxxxxxxxxxxx",
      secret: "xxxxxxxxxxxxxxxxxxx"
    }
    },
    { upsert: true }
  );

  // Add Google configuration entry
  ServiceConfiguration.configurations.update(
    { service: "google" },
    { $set: {
      clientId: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      client_email: "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
      secret: "XXXXXXXXXXXXXXXXXXXXXXXX"
    }
    },
    { upsert: true }
  );

  // Add Twitter configuration entry
  ServiceConfiguration.configurations.update(
    { service: "twitter" },
    { $set: {
      consumerKey: "XXXXXXXXXXXX",
      secret: "XXXXXXXX"
    }
    },
    { upsert: true }
  );

});

For service-configuration meteor add service-configuration required.