如何重新配置​​Meteor的accounts-facebook,或者Meteor的Facebook配置在哪里? [英] How do I REconfigure Meteor's accounts-facebook, or where is Meteor's Facebook configuration?

查看:97
本文介绍了如何重新配置​​Meteor的accounts-facebook,或者Meteor的Facebook配置在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Meteor的accounts-facebook软件包非常易于设置.为了输入Facebook应用程序ID和秘密令牌,我在浏览器中加载了流星Web应用程序,单击登录按钮,然后单击配置Facebook",这要求我提供应用程序ID和秘密令牌等配置值.

Meteor's accounts-facebook package was very easy to set up. To input the Facebook app ID and secret token, I loaded my meteor web app in a browser, and clicked on the login button, and then clicked 'Configure Facebook', which asked me for configuration values such as the app ID and secret token.

现在,我想更改这些内容,无法弄清楚它们的存储位置.我在流星应用程序目录或子目录的任何文件中都看不到它们,在数据库的任何地方也看不到它们.

Now I want to change those and can't figure out where they're stored. I don't see them in any file in my meteor app's directory or subdirectories, nor are they in the database anywhere.

推荐答案

配置数据存储在mongodb中.

The configuration data is stored in mongodb.

如果您加载

meteor mongo

然后使用db.meteor_accounts_loginServiceConfiguration.find(),您应该会看到您的配置数据

Then use db.meteor_accounts_loginServiceConfiguration.find() you should see your config data

您也可以更新它!如果回来了

You can update it too! If you got back

{ "service" : "x", "appId" : "x", "secret" : "x", "_id" : "abc" }`

在同一个mongo shell中:

Within the same mongo shell:

db.meteor_accounts_loginServiceConfiguration.update({_id:'abc'},
    {$set:{"appId" : <new app id>, "secret" : <new secret>}});

(使用要编辑的服务配置中的_id字段.

(Using the _id field from the service configuration that you want to edit.

在流星内,您可以改用它:

Within Meteor you can use this instead:

ServiceConfiguration.configurations.update({
    service:"facebook"
}, {
    $set: {
        <new params>
    }
});

请注意在流星中执行此操作,您需要使用

Note to do this within meteor you need to add this package in with :

meteor add service-configuration

这篇关于如何重新配置​​Meteor的accounts-facebook,或者Meteor的Facebook配置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆