Organization support
# support-questions-legacy
p
Organization support
I'm building an B2B MVP that is structured as each individual organization will have their own separate users. I've noticed Clerk and others have this support natively but are missing included FastAPI support. Is this an option or maybe even a workaround that I could do with SuperTokens?
r
Hey @para depends on what you want.
In the simplest case, you can modify the email being used by the user to include their tenant id like user+tenantId@example.com
And that way, you have different user pools per tenant / organisation
That being said, we are working on a multi tenant structure. What features are you looking for?
p
Thanks for the response. The features I need right now are very simple. As I explained before, every business would have their own users. The business should be able to have an outlook of their users and be able to manage it themselves. Also, each user should be able to join another business without conflicting with the existing one. As you explain above, appending
tenant_id
to their email would be the best solution to support organizations at the moment?
r
correct.
p
I guess adding the
organization_id
via user's metadata would have the same affect as appending emails?
r
not really. No. At the moment, you would have to change the user's email for it to work
p
Using
async def update_email_or_password
right?
r
No. By overriding the sign in and sign up function calls. The input to them is the email (for email password recipe) and you should modify the email before calling the original implementation
p
Ah I see, that makes sense. Thanks for clearing that up. I think it'd be easy to to implement for signing in (query local db to find the organization they belong to, although it could be an issue if they belong to multiple organizations). How would the organization be found for signing up?
r
For signing up, you can fetch the organisation id from the request object. For example, if you have one sub domain per org, then read the origin from the request and infer the org id
5 Views