Hi! I’m creating a react-native app where users can register and start working. This app is going to be multi-tenant(each registered user will have his data) and I’m planing to use Realm for offline and cloud sync.
I created an Atlas cluster. And custom roles for each database. One role = access to one database.
I know that multitenancy can work easily this way but I’m planning to use Realm.
So, after creating the Realm App, I enabled the user/email registration.
In the Rules section, I only see the Database.Collection.UserField way to separate data. That means that every collection will have all the customers data shared, just separated by this field.
Is there any way to configure something like this:
RealmUser->MongoDbRole or RealmUser->Database.* ?
Or I need to create a separate AppId for each tenant?
Of course, I know that enabling free registers is a open app is going to be a big NO. I’m planning to add some previous step (making a pre-registration/validation first).