We have a B2B app. Meaning that we sell it to different businesses, and each business has its own users of the same domain.
For example, assume I sold my app to companyX. CompanyX has now an admin which provides access to my app to multiple (dozens) users in its organization, logging in with their email (firstname.lastname@example.org).
What would be the best practice to manage the users?
The flow is that we open the first user for the “admin” in CompanyX - and he/she invites the users in the company. They can block/delete only their company users, etc.
Logging in to our app is done from our domain, and should NOT have subdomain for each company. Login screen is app.mycompany.com and all users from multiple companies log in from there.
what would be the way to implement this? by multi db connections? by multi tenants?
I’m a bit lost in this.