【发布时间】:2017-05-23 01:44:14
【问题描述】:
我正在开发一个自定义 login-with-linkedin 按钮。我有accounts-base、accounts-oauth 和pauli:accounts-linkedin 包。我使用了来自linkedin开发者网站的客户端ID和秘密如下
Meteor.startup(function() {
ServiceConfiguration.configurations.update({
'service': 'linkedin',
},
{
$set: {
'clientId': 'myClientId',
'secret': 'mySecret'
}
},
{
upsert: true
});
});
在 Iron 路由器中,我还在 /login 模板上定义了 waitOn 函数,如下所示:
this.route('login', {
path: '/login',
waitOn: function() {
Accounts.loginServicesConfigured();
}
});
现在,当我单击按钮时,会打开一个弹出窗口,但它不会加载linkedin 登录页面,并显示“ERR_CONTENT_DECODING_FAILED”。
我已经在客户端的 Meteor.startup 函数中编写了 ServiceConfiguration。我在客户端编写服务配置是否正确?还是我应该在服务器端编写它?
【问题讨论】:
标签: javascript meteor linkedin meteor-accounts