Can you use an external DB for the built-in Accounts package?


#1

I put this up on SO a few days ago, but got no love.

What i want to do is simple in concept, but I don’t know how to execute it or, more importantly, if doing so is a good idea.

I’m happy with the built-in accounts packages. They definitely suit all of my needs. Except I would like to have a handful of loosely associated meteor apps in different domain names use the same userbase. I know I can use external collections by defining like this:

if (Meteor.isServer) {
    var centralDB = new MongoInternals.RemoteCollectionDriver("mongodb://<central db>");
    MyCollection = new Mongo.Collection("mycollection", {_driver: centralDB});
}

And so it may be possible to do this with the built-in Users collection. But doing so would require switching off the automatic Users collection declaration, which is somewhere in the package that I could not find. So:

  1. Is this possible?
  2. If so, how?
  3. If so, is it a bad idea?