This is a contributors guide and NOT a user guide. Please visit these docs if you are using or evaluating SuperTokens.
This is just a proposal so far, it hasn't been accepted and needs further discussion.
Tenant Id is configured in the frontend using
async getTenantId config function.
What is the best way to pass the tenant Id to the backend auth APIs?
- Pass it as API query parameter or API request body
- Pass it as API header
Chosen option: Pass it as API query parameter or API request body, because
- Easy to use and understand
- Passing as header has more cons than this approach
getTenantId function to the
Multitenancy recipe, with
request object) as parameters. In the default implementation, we return the
frontendTenantId as is. With this approach, if the user wants to determine the
tenantId in the backend without adding any logic on the frontend, it can be done by overriding this recipe function.