Social login from 2 apps into 1 user account stored in shared DB


#1

My requirement is as follows: I want to run 2 separate Meteor.js apps that share the same database (multi-tenancy on collection field level). Both apps are using their own domains, let’s say abc.com and xyz.com. The user shall be able to login to both apps using social login (Facebook, Twitter). But I want to map the login of both apps to the same shared user account (the user database is not multi-tenancy). Is such a unified login possible? AFAIK, OAuth authentication is based on domain names, and the tokens are sent via a back-link to this domain, to be stored in the user object. If I understand it correctly, only one token is stored for each OAuth provider, so the login to xyz.com would overwrite the token for abc.com. If so, is there a way to overcome this limitation? (I also have to take mobile apps into account.)