Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor Login Service Not Configured

I'm using Meteor.loginWithFacebook to give users access to my app. The code is

Meteor.loginWithFacebook({
    loginStyle:"redirect"
}, function(err){
    if (err) {
        throw err;
    }
    else{
        window.location = "/landing"
    }
});

My server has an accounts.js with the following:

ServiceConfiguration.configurations.remove({
  service: "facebook"
});
ServiceConfiguration.configurations.insert({
  service: "facebook",
  appId: "id",
  secret: "secret"
});

It works on desktop and has worked when bundled into cordova, yet suddenly, it does not work and presents me with the error that Login service not yet configured.

Uncaught Error: ServiceConfiguration.ConfigError: Login service configuration not yet loaded:2199:http://meteor.local/packages/blaze.js

I keep seeing Accounts.loginServicesConfigured() mentioned everywhere but do not see that explained in the docs and thus don't know how to use it.

Any help?

like image 242
thatgibbyguy Avatar asked Sep 28 '22 02:09

thatgibbyguy


1 Answers

The solution is in IronRouter:

waitOn:function(){
    Accounts.loginServicesConfigured();
}
like image 119
thatgibbyguy Avatar answered Oct 03 '22 01:10

thatgibbyguy