Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I REconfigure Meteor's accounts-facebook, or where is Meteor's Facebook configuration?

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.

like image 413
Tyler Collier Avatar asked Jun 17 '13 04:06

Tyler Collier


1 Answers

The configuration data is stored in mongodb.

If you load up

meteor mongo

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" }`

Within the same mongo shell:

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

(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
like image 156
Tarang Avatar answered Nov 07 '22 20:11

Tarang