meteor 1.1.0.2
We have 3 apps and 1 backend services
for the mobile clients.
for the mobile suppliers.
for our web app.
all of these 3 apps use same backend but use different accounts system, is it possible for now ?
we want to separate these 3 type of users to different collections like
clientUsers = new Mongo.Collection 'client_users'
supplierUsers = new Mongo.Collection 'supplier_users'
Meteor.users = new Mongo.Collection 'users'
ahref
July 18, 2015, 5:56am
2
What’s the reason for the separation here?
Could you not use roles? suppliers would have the “supplier” role and access control would allow/restrict them from other areas?
that only will make our app big and hard to maintain.
why i have to ship features that clients should never used, then verse vice to suppliers.
what if some suppliers.
This has been published recently: https://medium.com/meteor-js/exploring-users-and-logins-with-meteor-20395446aaed and it covers pretty much what you are after.
@serkandurusoy thank you, i will check it.
for now i use mup to deploy 3 apps separately and enable oplog by manually.
pass MONGO_URL and MONGO_OPLOG_URL to same db, it works fine.
but i think if we can use ddp login everywhere it would be cool.
But you said you want to separate the user collections as well as separate data by feature. By pointing at the same db, you are actually using the same database and the same user collection. (although you are deploying different apps)
@serkandurusoy
i can’t make remote account login working properly.
you can change default users collection by
Meteor.users = new Mongo.Collection 'client_users'
Take a look at the following:
@crapthings : Where do you pass the MONGO_URL and MONGO_OPLOG_URL? In settings.json? Can you please share the code? Thanks
“env”: {
“ROOT_URL”: “http://your ip or domain name”,
“PORT”: 8061,
“MONGO_URL”: “mongodb://localhost:27017/app name here”,
“MONGO_OPLOG_URL”: “mongodb://localhost:27017/local”
},
and read this
1 Like