Adding Facebook authentication in angular2-meteor


I finished the Socially tutorial and I am trying to extend it further. One primary thing I’m trying to do is add Facebook authentication as an option for logging in.

An inquiry on gitter got me part way. I’ve installed the services-configuration package, and created a service.ts file in server that contains this (replacing appId and secret, of course):

    "service": "facebook" 
}, {
    $set: {
        "settings": {
            "appId": “appid”,
            “secret": "secret",
            "loginStyle": "popup"

But on compile, I get an error saying "cannot find name ‘ServiceConfiguration’ ".

Client side, I’m calling this on a button in a class that has imported Meteor

facebook() {
    Meteor.loginWithFacebook((err) => {
      if (err) {
        //Handle error
      } else {
        //Handle sign in (I reroute)

But when it is clicked I get the error “meteor_1.Meteor.loginWithFacebook is not a function”, presumably linked to the fact that my server side code isn’t working.

It seems like this should be pretty straight forward, but I’ll admit I’m at something of a loss. Any pointers?


Have you done meteor add service-configuration?


Yup, in fact my first thought was the install somehow failed so I’ve reinstalled and uninstalled/installed again. Still same issue.