Skip to main content
Paid Feature

This is a paid feature. Email us to get a license key to start a SuperTokens subscription.

If you want to try this feature without contacting us, you can sign up for our managed service, and use this feature in our development environment for free.

Setting up login for tenants

Once you have created tenants for your app with specific login methods enabled for them (third party, email password, passwordless), you have to pick which auth recipe to use in your app.

note

By default, when the core first starts, or when you create a new app in the core, SuperTokens creates a tenant (with tenantId as "public"), and enables all the login methods for them.

The auth recipe you choose from our frontend & backend SDKs depend on which login methods you have enabled across all tenants in your app. Here are a few examples:

  • If you have enabled email password login for all tenants, you can use the emailpassword recipe.
  • If you have enabled third party login for all tenants, you can use the thirdparty recipe.
  • If you have enabled passwordless login for all tenants, you can use the passwordless recipe.
  • If you are using a combination of email password login and third party login across your tenants, then you can use the thirdpartyemailpassword recipe.
  • If you are using a combination of passwordless login and third party login across your tenants, then you can use the thirdpartypasswordless recipe.
  • If you are using a combination of email password, passwordless login and third party login across your tenants, then you can use the thirdpartyemailpassword recipe and thirdpartypasswordless recipe. SuperTokens will automatically pick the right recipe for each tenant. The only restriction is that if a specific tenant has enabled all the login methods, and you are using both, thirdpartyemailpassword and thirdpartypasswordless recipes, then the pre built UI will show only social login + email password login for them. That being said, you can always customise the UI to show all the login methods as done in this demo app.

Once you have selected the right recipe for your application, you should follow the setup guides for them:

Get started

For using our pre built UI (website only), see the "Quick setup with pre built UI section", else for custom UI or mobile apps, see the "Using your own UI section". You should follow all the parts of one of these sections, and under these sections you will further find a page on Multi tenancy which will help you setup a login experience in your app using our SDKs.

Which UI do you use?
Custom UI
Pre built UI