流星登录服务未配置 [英] Meteor Login Service Not Configured
问题描述
我正在使用Meteor.loginWithFacebook授予用户访问我的应用程序的权限.代码是
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"
}
});
我的服务器有一个accounts.js,其中包含以下内容:
My server has an accounts.js with the following:
ServiceConfiguration.configurations.remove({
service: "facebook"
});
ServiceConfiguration.configurations.insert({
service: "facebook",
appId: "id",
secret: "secret"
});
它可以在台式机上工作,并且捆绑到cordova中时可以使用,但是突然,它无法工作,并向我显示尚未配置登录服务的错误.
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.
未捕获的错误:ServiceConfiguration.ConfigError:尚未加载登录服务配置:2199: http://meteor.local/packages/blaze.js
我一直到处都看到 Accounts.loginServicesConfigured(),但看不到文档中说明的内容,因此不知道如何使用它.
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.
有帮助吗?
推荐答案
该解决方案在IronRouter中:
The solution is in IronRouter:
waitOn:function(){
Accounts.loginServicesConfigured();
}
这篇关于流星登录服务未配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!