It’s common to need multitenant using something similar to user_id, like account_id.
Is there a thin pattern for this that supports Auth?
It’s common to need multitenant using something similar to user_id, like account_id.
Is there a thin pattern for this that supports Auth?
Yes, right now the default thing for multi tenancy is using a user_id
column in all the tables. Or you might also have something like account_id
or team_id
.
Check Policies: Authorization with Thin - Thin Backend at the end of that page there’s an example for a policy for a team.
In the far future we might also support multi database tenancy.