I would like to set-up a multi-tenancy scenario where:
- 2 Meteor apps are using the same database
- Each app has its own internet domain
- Some of the collections are used by both apps, others are separating tenant-specific data using a tenant field
- One of the shared data collections is the user collection
- That means: a user should be able to use the same credentials in both apps
For username / password based auth, I managed to set this up, and it works.
Now I want to add social login, e.g. via Facebook. Here is where things get tricky. Facebook lets me define only one website URL per app, so I need two different “apps” on Facebook side (because my apps use different toplevel domains). So, if the user logs in with one app, she will get a Facebook token. And once she logs in to the other app, she will get another Facebook token. But the user collection only has space for exactly one token. Is there any way to store multiple Facebook login data sets together with the same user?