Skip to main content
important

This is a contributors guide and NOT a user guide. Please visit these docs if you are using or evaluating SuperTokens.

Initial state of default tenant in core

Status

This is just a proposal so far, it hasn't been accepted and needs further discussion.

Status:
proposed
Deciders:
rishabhpoddar, porcellus
Proposed by:
porcellus
Created:
2022-10-25

Context and Problem Statement#

Since the backend SDK's recipe APIs query to check the core about if the recipe is enabled for the input (or defaul) tenant, what is the desired initial state of default tenant in the core?

Considered Options#

  • Do not create a default tenant in core, assume all recipes are enabled if config not found
  • Do not create a default tenant in core and assume no recipes are enabled by default.
  • Create a default tenant in core with all recipes (emailpassword, passwordless and thirdparty) enabled

Decision Outcome#

Chosen option: Create a default tenant in core with all recipes enabled, because

  • Best user experience with statically configured recipes
  • Recipe APIs can check if the recipe is enabled without having to handle the corner cases

Pros and Cons of the Options#

Do not create a default tenant in core, assume all recipes are enabled if config not found#

  • Better user experience with statically configured recipes, as they will work as expected
  • When a config is not found, recipes would have to allow in case of default tenant and deny for other tenants, which is an unnecessary extra check.
  • Do not create a default tenant in core and assume no recipes are enabled by default.#

  • Bad user experience as statically configured recipe won't work out of the box until enabled in core
  • Create a default tenant in core with all recipes enabled#

  • Better user experience with statically configured recipes, as they will work as expected
  • Recipes can do recipe checks for default tenant and other tenants alike