From 332c4df58f18bdff18c570281686230916bd0663 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Tue, 14 May 2024 18:36:19 +0530 Subject: [PATCH 1/8] fix: changes for multitenancy --- .../multi-tenancy/multi-app.mdx | 8 ++- .../multi-tenancy/new-tenant-config.mdx | 28 +++++------ .../custom-ui/multitenant-login.mdx | 2 +- .../pre-built-ui/multitenant-login.mdx | 2 +- v2/multitenancy/list-tenants-and-apps.mdx | 36 ++++++------- v2/multitenancy/new-app.mdx | 8 ++- v2/multitenancy/new-tenant.mdx | 50 +++++++++++-------- .../multi-tenancy/multi-app.mdx | 8 ++- .../multi-tenancy/new-tenant-config.mdx | 26 +++++----- .../multi-tenancy/multi-app.mdx | 8 ++- .../multi-tenancy/new-tenant-config.mdx | 26 +++++----- .../multi-tenancy/multi-app.mdx | 8 ++- .../multi-tenancy/new-tenant-config.mdx | 26 +++++----- .../multi-tenancy/multi-app.mdx | 8 ++- .../multi-tenancy/new-tenant-config.mdx | 26 +++++----- 15 files changed, 129 insertions(+), 141 deletions(-) diff --git a/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx b/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx index 1c1f736ec..f4de70e3a 100644 --- a/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx @@ -31,14 +31,12 @@ In order to create a new app in the SuperTokens core, you can use the following ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "appId": "app1", - "thirdPartyEnabled": true, - "passwordlessEnabled": true, - "emailPasswordEnabled": true, + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] "coreConfig": {...} }' ``` @@ -48,7 +46,7 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - The above command will create (or update) an app with the appId of `app1`. - It will also create a default tenant for this app with the tenant ID of `public` (i.e. the default tenantId) - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). -- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `false` to any of the login methods specified above to disable them. +- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx index 242d7f64d..a686bfa8f 100644 --- a/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -133,7 +133,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -286,7 +286,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -340,9 +340,7 @@ async function getTenant(tenantId: string) { } else { let coreConfig = resp.coreConfig; - let isEmailPasswordLoginEnabled = resp.emailPassword.enabled; - let isThirdPartyLoginEnabled = resp.thirdParty.enabled; - let isPasswordlessLoginEnabled = resp.passwordless.enabled; + let firstFactors = resp.firstFactors; let configuredThirdPartyProviders = resp.thirdParty.providers; } @@ -393,6 +391,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -455,6 +457,10 @@ else: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -462,7 +468,7 @@ else: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -482,22 +488,16 @@ Otherwise you will get a `200` status code with the following JSON output: ```json { "status": "OK", - "emailPassword": { - "enabled": boolean - }, "thirdParty": { - "enabled": boolean, "providers": [...] }, - "passwordless": { - "enabled": boolean - }, "coreConfig": { "email_verification_token_lifetime": 7200000, "password_reset_token_lifetime": 3600000, "postgresql_connection_uri": "postgresql://localhost:5432/db2" }, - "tenantId": "customer1" + "tenantId": "customer1", + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"], } ``` diff --git a/v2/emailpassword/custom-ui/multitenant-login.mdx b/v2/emailpassword/custom-ui/multitenant-login.mdx index fdbf60418..04bbf1142 100644 --- a/v2/emailpassword/custom-ui/multitenant-login.mdx +++ b/v2/emailpassword/custom-ui/multitenant-login.mdx @@ -150,7 +150,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ diff --git a/v2/emailpassword/pre-built-ui/multitenant-login.mdx b/v2/emailpassword/pre-built-ui/multitenant-login.mdx index ef6685d87..2aa944b8d 100644 --- a/v2/emailpassword/pre-built-ui/multitenant-login.mdx +++ b/v2/emailpassword/pre-built-ui/multitenant-login.mdx @@ -147,7 +147,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ diff --git a/v2/multitenancy/list-tenants-and-apps.mdx b/v2/multitenancy/list-tenants-and-apps.mdx index 0833810c1..0098d741f 100644 --- a/v2/multitenancy/list-tenants-and-apps.mdx +++ b/v2/multitenancy/list-tenants-and-apps.mdx @@ -33,9 +33,7 @@ async function listAllTenants() { tenants.forEach(tenant => { let coreConfig = tenant.coreConfig; - let isEmailPasswordLoginEnabled = tenant.emailPassword.enabled; - let isThirdPartyLoginEnabled = tenant.thirdParty.enabled; - let isPasswordlessLoginEnabled = tenant.passwordless.enabled; + let firstFactors = tenant.firstFactors; let configuredThirdPartyProviders = tenant.thirdParty.providers; }); @@ -88,6 +86,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to list the tenants. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -163,6 +165,10 @@ for tenant in response.tenants: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to list the tenants. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -170,7 +176,7 @@ for tenant in response.tenants: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/list' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/list/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -184,17 +190,11 @@ You will get the following JSON output: "status": "OK", "tenants": [{ "tenantId": "customer1", - "emailPassword": { - "enabled": true - }, "thirdParty": { - "enabled": true, "providers": [...] }, - "passwordless": { - "enabled": true - }, - "coreConfig": {...} + "coreConfig": {...}, + "firstFactors": [...] }] } ``` @@ -210,7 +210,7 @@ This can only be done via a cURL command. There is no helper function for this i ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/list' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/list/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -226,17 +226,11 @@ You will get the following JSON output: "appId": "app1", "tenants": [{ "tenantId": "customer1", - "emailPassword": { - "enabled": true - }, "thirdParty": { - "enabled": true, "providers": [...] }, - "passwordless": { - "enabled": true - }, - "coreConfig": {...} + "coreConfig": {...}, + "firstFactors": [...] }] }] } diff --git a/v2/multitenancy/new-app.mdx b/v2/multitenancy/new-app.mdx index 38045265c..2419694d3 100644 --- a/v2/multitenancy/new-app.mdx +++ b/v2/multitenancy/new-app.mdx @@ -30,14 +30,12 @@ In order to create a new app in the SuperTokens core, you can use the following ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "appId": "app1", - "thirdPartyEnabled": true, - "passwordlessEnabled": true, - "emailPasswordEnabled": true, + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] "coreConfig": {...} }' ``` @@ -47,7 +45,7 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - The above command will create (or update) an app with the appId of `app1`. - It will also create a default tenant for this app with the tenant ID of `public` (i.e. the default tenantId) - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). -- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `false` to any of the login methods specified above to disable them. +- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/multitenancy/new-tenant.mdx b/v2/multitenancy/new-tenant.mdx index 05da6c0cc..afb10e5fe 100644 --- a/v2/multitenancy/new-tenant.mdx +++ b/v2/multitenancy/new-tenant.mdx @@ -26,9 +26,7 @@ import Multitenancy from "supertokens-node/recipe/multitenancy"; async function createNewTenant() { let resp = await Multitenancy.createOrUpdateTenant("customer1", { - emailPasswordEnabled: true, - thirdPartyEnabled: true, - passwordlessEnabled: true + firstFactors: ["emailpassword", "thirdparty", "otp-email", "otp-phone"] }); if (resp.createdNew) { @@ -39,7 +37,8 @@ async function createNewTenant() { } ``` -- In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party and passwordless login for this tenant. You can also disable any of these by setting the corresponding field to `false` (which is also the default setting). +- In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party, email OTP and phone OTP login methods for this tenant. You can also disable any of these by setting by not including them in the `firstFactors` input. If `firstFactors` is not specified, by default, none of the login methods are enabled. +- You can also set `firstFactors` to `null` in which case SDK will be able to use any of the login methods. @@ -77,6 +76,10 @@ func main() { - In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party and passwordless login for this tenant. You can also disable any of these by setting the corresponding field to `false` (which is also the default setting). +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to create the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -129,6 +132,10 @@ else: - In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party and passwordless login for this tenant. You can also disable any of these by setting the corresponding field to `false` (which is also the default setting). +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to create the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -136,21 +143,20 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid-/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid-/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "tenantId": "customer1", - "emailPasswordEnabled": true, - "thirdPartyEnabled": true, - "passwordlessEnabled": true + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] }' ``` - We specify the appId for which we want to create a new tenant in the URL. If you are using the default (`"public"`) app, you can omit the `/appid-` part of the URL. -- In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party and passwordless login for this tenant. You can also disable any of these by setting the corresponding field to `false` (which is also the default setting). +- In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party, email OTP and phone OTP login methods for this tenant. You can also disable any of these by not including them in the `firstFactors` array. If `firstFactors` is not specified, by default, none of the login methods will be enabled. +- You can also set `firstFactors` to `null` in which case SDK will be able to use any of the login methods. @@ -287,7 +293,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -341,9 +347,7 @@ async function getTenant(tenantId: string) { } else { let coreConfig = resp.coreConfig; - let isEmailPasswordLoginEnabled = resp.emailPassword.enabled; - let isThirdPartyLoginEnabled = resp.thirdParty.enabled; - let isPasswordlessLoginEnabled = resp.passwordless.enabled; + let firstFactors = resp.firstFactors; let configuredThirdPartyProviders = resp.thirdParty.providers; } @@ -394,6 +398,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -456,6 +464,10 @@ else: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -463,7 +475,7 @@ else: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -483,22 +495,16 @@ Otherwise you will get a `200` status code with the following JSON output: ```json { "status": "OK", - "emailPassword": { - "enabled": boolean - }, "thirdParty": { - "enabled": boolean, "providers": [...] }, - "passwordless": { - "enabled": boolean - }, "coreConfig": { "email_verification_token_lifetime": 7200000, "password_reset_token_lifetime": 3600000, "postgresql_connection_uri": "postgresql://localhost:5432/db2" }, - "tenantId": "customer1" + "tenantId": "customer1", + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"], } ``` diff --git a/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx b/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx index 1c1f736ec..f4de70e3a 100644 --- a/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx @@ -31,14 +31,12 @@ In order to create a new app in the SuperTokens core, you can use the following ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "appId": "app1", - "thirdPartyEnabled": true, - "passwordlessEnabled": true, - "emailPasswordEnabled": true, + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] "coreConfig": {...} }' ``` @@ -48,7 +46,7 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - The above command will create (or update) an app with the appId of `app1`. - It will also create a default tenant for this app with the tenant ID of `public` (i.e. the default tenantId) - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). -- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `false` to any of the login methods specified above to disable them. +- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx index 88b59a3c5..173d78922 100644 --- a/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -284,7 +284,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -338,9 +338,7 @@ async function getTenant(tenantId: string) { } else { let coreConfig = resp.coreConfig; - let isEmailPasswordLoginEnabled = resp.emailPassword.enabled; - let isThirdPartyLoginEnabled = resp.thirdParty.enabled; - let isPasswordlessLoginEnabled = resp.passwordless.enabled; + let firstFactors = resp.firstFactors; let configuredThirdPartyProviders = resp.thirdParty.providers; } @@ -391,6 +389,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -453,6 +455,10 @@ else: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -460,7 +466,7 @@ else: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -480,22 +486,16 @@ Otherwise you will get a `200` status code with the following JSON output: ```json { "status": "OK", - "emailPassword": { - "enabled": boolean - }, "thirdParty": { - "enabled": boolean, "providers": [...] }, - "passwordless": { - "enabled": boolean - }, "coreConfig": { "email_verification_token_lifetime": 7200000, "password_reset_token_lifetime": 3600000, "postgresql_connection_uri": "postgresql://localhost:5432/db2" }, - "tenantId": "customer1" + "tenantId": "customer1", + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"], } ``` diff --git a/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx index 1c1f736ec..f4de70e3a 100644 --- a/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx @@ -31,14 +31,12 @@ In order to create a new app in the SuperTokens core, you can use the following ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "appId": "app1", - "thirdPartyEnabled": true, - "passwordlessEnabled": true, - "emailPasswordEnabled": true, + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] "coreConfig": {...} }' ``` @@ -48,7 +46,7 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - The above command will create (or update) an app with the appId of `app1`. - It will also create a default tenant for this app with the tenant ID of `public` (i.e. the default tenantId) - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). -- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `false` to any of the login methods specified above to disable them. +- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx index 00a6032ce..52ca5e6d7 100644 --- a/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -454,7 +454,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -508,9 +508,7 @@ async function getTenant(tenantId: string) { } else { let coreConfig = resp.coreConfig; - let isEmailPasswordLoginEnabled = resp.emailPassword.enabled; - let isThirdPartyLoginEnabled = resp.thirdParty.enabled; - let isPasswordlessLoginEnabled = resp.passwordless.enabled; + let firstFactors = resp.firstFactors; let configuredThirdPartyProviders = resp.thirdParty.providers; } @@ -561,6 +559,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -623,6 +625,10 @@ else: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -630,7 +636,7 @@ else: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -650,22 +656,16 @@ Otherwise you will get a `200` status code with the following JSON output: ```json { "status": "OK", - "emailPassword": { - "enabled": boolean - }, "thirdParty": { - "enabled": boolean, "providers": [...] }, - "passwordless": { - "enabled": boolean - }, "coreConfig": { "email_verification_token_lifetime": 7200000, "password_reset_token_lifetime": 3600000, "postgresql_connection_uri": "postgresql://localhost:5432/db2" }, - "tenantId": "customer1" + "tenantId": "customer1", + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"], } ``` diff --git a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx index 1c1f736ec..f4de70e3a 100644 --- a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx @@ -31,14 +31,12 @@ In order to create a new app in the SuperTokens core, you can use the following ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "appId": "app1", - "thirdPartyEnabled": true, - "passwordlessEnabled": true, - "emailPasswordEnabled": true, + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] "coreConfig": {...} }' ``` @@ -48,7 +46,7 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - The above command will create (or update) an app with the appId of `app1`. - It will also create a default tenant for this app with the tenant ID of `public` (i.e. the default tenantId) - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). -- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `false` to any of the login methods specified above to disable them. +- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx index ca1e96b8f..9b4ad3c34 100644 --- a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -469,7 +469,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -523,9 +523,7 @@ async function getTenant(tenantId: string) { } else { let coreConfig = resp.coreConfig; - let isEmailPasswordLoginEnabled = resp.emailPassword.enabled; - let isThirdPartyLoginEnabled = resp.thirdParty.enabled; - let isPasswordlessLoginEnabled = resp.passwordless.enabled; + let firstFactors = resp.firstFactors; let configuredThirdPartyProviders = resp.thirdParty.providers; } @@ -576,6 +574,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -638,6 +640,10 @@ else: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -645,7 +651,7 @@ else: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -665,22 +671,16 @@ Otherwise you will get a `200` status code with the following JSON output: ```json { "status": "OK", - "emailPassword": { - "enabled": boolean - }, "thirdParty": { - "enabled": boolean, "providers": [...] }, - "passwordless": { - "enabled": boolean - }, "coreConfig": { "email_verification_token_lifetime": 7200000, "password_reset_token_lifetime": 3600000, "postgresql_connection_uri": "postgresql://localhost:5432/db2" }, - "tenantId": "customer1" + "tenantId": "customer1", + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"], } ``` diff --git a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx index 3413d3d86..13945da6c 100644 --- a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx @@ -32,14 +32,12 @@ In order to create a new app in the SuperTokens core, you can use the following ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/app/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "appId": "app1", - "thirdPartyEnabled": true, - "passwordlessEnabled": true, - "emailPasswordEnabled": true, + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"] "coreConfig": {...} }' ``` @@ -49,7 +47,7 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - The above command will create (or update) an app with the appId of `app1`. - It will also create a default tenant for this app with the tenant ID of `public` (i.e. the default tenantId) - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). -- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `false` to any of the login methods specified above to disable them. +- By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx index 0e2fea9eb..99a80a648 100644 --- a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -461,7 +461,7 @@ else: ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -515,9 +515,7 @@ async function getTenant(tenantId: string) { } else { let coreConfig = resp.coreConfig; - let isEmailPasswordLoginEnabled = resp.emailPassword.enabled; - let isThirdPartyLoginEnabled = resp.thirdParty.enabled; - let isPasswordlessLoginEnabled = resp.passwordless.enabled; + let firstFactors = resp.firstFactors; let configuredThirdPartyProviders = resp.thirdParty.providers; } @@ -568,6 +566,10 @@ func main() { } ``` +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -630,6 +632,10 @@ else: +:::important +This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. +::: + @@ -637,7 +643,7 @@ else: ```bash -curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant' \ +curl --location --request GET '^{coreInjector_uri_without_quotes}/customer1/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' ``` @@ -657,22 +663,16 @@ Otherwise you will get a `200` status code with the following JSON output: ```json { "status": "OK", - "emailPassword": { - "enabled": boolean - }, "thirdParty": { - "enabled": boolean, "providers": [...] }, - "passwordless": { - "enabled": boolean - }, "coreConfig": { "email_verification_token_lifetime": 7200000, "password_reset_token_lifetime": 3600000, "postgresql_connection_uri": "postgresql://localhost:5432/db2" }, - "tenantId": "customer1" + "tenantId": "customer1", + "firstFactors": ["emailpassword", "thirdparty", "otp-email", "otp-phone"], } ``` From 8f02028b6440fc1116fc14a5ff88ba2cd1e48852 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Tue, 14 May 2024 18:46:11 +0530 Subject: [PATCH 2/8] fix: mfa docs --- v2/mfa/backend-setup.mdx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/v2/mfa/backend-setup.mdx b/v2/mfa/backend-setup.mdx index 1956a6361..3ecb59ddb 100644 --- a/v2/mfa/backend-setup.mdx +++ b/v2/mfa/backend-setup.mdx @@ -166,8 +166,6 @@ import MultiFactorAuth from "supertokens-node/recipe/multifactorauth" async function createNewTenant() { let resp = await Multitenancy.createOrUpdateTenant("customer1", { - emailPasswordEnabled: true, - passwordlessEnabled: true, firstFactors: [MultiFactorAuth.FactorIds.EMAILPASSWORD] }); @@ -200,13 +198,11 @@ Coming soon. In the meantime, checkout the [legacy method](./legacy-method/how-i ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid-/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid-/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "tenantId": "customer1", - "emailPasswordEnabled": true, - "passwordlessEnabled": true, "firstFactors": ["emailpassword"] }' ``` @@ -537,8 +533,6 @@ import MultiFactorAuth from "supertokens-node/recipe/multifactorauth" async function createNewTenant() { let resp = await Multitenancy.createOrUpdateTenant("customer1", { - emailPasswordEnabled: true, - passwordlessEnabled: true, firstFactors: [MultiFactorAuth.FactorIds.EMAILPASSWORD], requiredSecondaryFactors: [MultiFactorAuth.FactorIds.OTP_EMAIL] }); @@ -572,13 +566,11 @@ Coming soon. In the meantime, checkout the [legacy method](./legacy-method/how-i ```bash -curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid-/recipe/multitenancy/tenant' \ +curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid-/recipe/multitenancy/tenant/v2' \ --header 'api-key: ^{coreInjector_api_key_without_quotes}' \ --header 'Content-Type: application/json' \ --data-raw '{ "tenantId": "customer1", - "emailPasswordEnabled": true, - "passwordlessEnabled": true, "firstFactors": ["emailpassword"], "requiredSecondaryFactors": ["otp-email"] }' From 6965fccee7543e9c2a6e496f2dd14a486b150d77 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Wed, 15 May 2024 12:41:04 +0530 Subject: [PATCH 3/8] fix: first factor related --- .../multi-tenancy/multi-app.mdx | 9 ++++++++ v2/multitenancy/list-tenants-and-apps.mdx | 13 +++++++++++ v2/multitenancy/new-app.mdx | 9 ++++++++ v2/multitenancy/new-tenant.mdx | 23 +++++++++++++++---- .../multi-tenancy/multi-app.mdx | 9 ++++++++ .../multi-tenancy/multi-app.mdx | 9 ++++++++ .../multi-tenancy/multi-app.mdx | 9 ++++++++ .../multi-tenancy/multi-app.mdx | 9 ++++++++ 8 files changed, 86 insertions(+), 4 deletions(-) diff --git a/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx b/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx index f4de70e3a..6ebd47e54 100644 --- a/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx @@ -48,6 +48,15 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). - By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. ::: diff --git a/v2/multitenancy/list-tenants-and-apps.mdx b/v2/multitenancy/list-tenants-and-apps.mdx index 0098d741f..d11f973b7 100644 --- a/v2/multitenancy/list-tenants-and-apps.mdx +++ b/v2/multitenancy/list-tenants-and-apps.mdx @@ -40,6 +40,12 @@ async function listAllTenants() { } ``` +The value of `firstFactors` can be as follows: + +- `undefined`: All login methods are enabled in the core, any auth recipe initialised in the backend SDK will work +- `[]` (empty array): No login methods are enabled for the tenant +- a non-empty array: Only the login methods in the array are enabled for the tenant + @@ -199,6 +205,13 @@ You will get the following JSON output: } ``` +The value of `firstFactors` can be as follows: + +- `undefined`: All login methods are enabled in the core, any auth recipe initialised in the backend SDK will work +- `[]` (empty array): No login methods are enabled for the tenant +- a non-empty array: Only the login methods in the array are enabled for the tenant + + diff --git a/v2/multitenancy/new-app.mdx b/v2/multitenancy/new-app.mdx index 2419694d3..4dba465b9 100644 --- a/v2/multitenancy/new-app.mdx +++ b/v2/multitenancy/new-app.mdx @@ -47,6 +47,15 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). - By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. ::: diff --git a/v2/multitenancy/new-tenant.mdx b/v2/multitenancy/new-tenant.mdx index afb10e5fe..4aee19862 100644 --- a/v2/multitenancy/new-tenant.mdx +++ b/v2/multitenancy/new-tenant.mdx @@ -13,10 +13,6 @@ import CoreInjector from "/src/components/coreInjector" # Creating a new tenant -## Basic tenant creation - -A new tenant can be created for an app using our backend SDK functions or a cURL command as shown below. If an appId is not explicitly specified, the tenant will be created in the `"public"` appId (the default app that is created when the SuperTokens core first starts). - @@ -40,6 +36,15 @@ async function createNewTenant() { - In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party, email OTP and phone OTP login methods for this tenant. You can also disable any of these by setting by not including them in the `firstFactors` input. If `firstFactors` is not specified, by default, none of the login methods are enabled. - You can also set `firstFactors` to `null` in which case SDK will be able to use any of the login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + @@ -158,6 +163,16 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/appid- - In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party, email OTP and phone OTP login methods for this tenant. You can also disable any of these by not including them in the `firstFactors` array. If `firstFactors` is not specified, by default, none of the login methods will be enabled. - You can also set `firstFactors` to `null` in which case SDK will be able to use any of the login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + + diff --git a/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx b/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx index f4de70e3a..6ebd47e54 100644 --- a/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx @@ -48,6 +48,15 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). - By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. ::: diff --git a/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx index f4de70e3a..6ebd47e54 100644 --- a/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx @@ -48,6 +48,15 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). - By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. ::: diff --git a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx index f4de70e3a..6ebd47e54 100644 --- a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx @@ -48,6 +48,15 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). - By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. ::: diff --git a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx index 13945da6c..7feeceb02 100644 --- a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx @@ -49,6 +49,15 @@ curl --location --request PUT '^{coreInjector_uri_without_quotes}/recipe/multite - You can set various core configs for this app (see the config.yaml / docker env var options for your core). The core configs for a new app will inherit from the the configs provided in the config.yaml / docker env (or our edit config dashboard for managed service). - By default, all the login methods are enabled for a new app (specifically, the `public` tenant of the new app), but you can pass in `firstFactors` input to specifically enable selected login methods. +The built-in Factor IDs that can be used for `firstFactors` are: +- Email password auth: `emailpassword` +- Social login / enterprise SSO auth: `thirdparty` +- Passwordless: + - With email OTP: `otp-email` + - With SMS OTP: `sms-otp` + - With email magic link: `link-email` + - With SMS magic link: `sms-link` + :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. ::: From 2eed695d748ed074ba000a7d4d111a251935812d Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Wed, 15 May 2024 13:16:30 +0530 Subject: [PATCH 4/8] fix: type checking for node --- v2/src/plugins/codeTypeChecking/jsEnv/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/src/plugins/codeTypeChecking/jsEnv/package.json b/v2/src/plugins/codeTypeChecking/jsEnv/package.json index 1ac8510f9..0beeb6026 100644 --- a/v2/src/plugins/codeTypeChecking/jsEnv/package.json +++ b/v2/src/plugins/codeTypeChecking/jsEnv/package.json @@ -55,8 +55,8 @@ "react-router-dom5": "npm:react-router-dom@^5.3.0", "socket.io": "^4.6.1", "socketio": "^1.0.0", - "supertokens-auth-react": "^0.41.0", - "supertokens-node": "^17.1.0", + "supertokens-auth-react": "^0.41.1", + "supertokens-node": "github:supertokens/supertokens-node#dashboard-api-impl", "supertokens-node7": "npm:supertokens-node@7.3", "supertokens-react-native": "^5.0.0", "supertokens-web-js": "^0.11.0", From 7ca06f8b3091f49bab40b974dff24c7841f1d68b Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Tue, 16 Jul 2024 17:42:20 +0530 Subject: [PATCH 5/8] fix: factor ids --- .../common-customizations/multi-tenancy/multi-app.mdx | 4 ++-- v2/mfa/important-concepts.mdx | 4 ++-- v2/multitenancy/new-app.mdx | 4 ++-- v2/multitenancy/new-tenant.mdx | 8 ++++---- .../common-customizations/multi-tenancy/multi-app.mdx | 4 ++-- v2/src/plugins/codeTypeChecking/jsEnv/package.json | 4 ++-- .../common-customizations/multi-tenancy/multi-app.mdx | 4 ++-- .../common-customizations/multi-tenancy/multi-app.mdx | 4 ++-- .../common-customizations/multi-tenancy/multi-app.mdx | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx b/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx index 6ebd47e54..8beb49f2b 100644 --- a/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/emailpassword/common-customizations/multi-tenancy/multi-app.mdx @@ -53,9 +53,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/mfa/important-concepts.mdx b/v2/mfa/important-concepts.mdx index ec61caaba..77df5997a 100644 --- a/v2/mfa/important-concepts.mdx +++ b/v2/mfa/important-concepts.mdx @@ -16,9 +16,9 @@ Each auth challenge has a factor ID in SuperTokens: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` - TOTP: `totp` These factor IDs will be used to configure the MFA requirements for users (except the `acccess-denied` one), and also will be used to indicate which auth challenges have been completed in the current session. diff --git a/v2/multitenancy/new-app.mdx b/v2/multitenancy/new-app.mdx index 4dba465b9..f9b403015 100644 --- a/v2/multitenancy/new-app.mdx +++ b/v2/multitenancy/new-app.mdx @@ -52,9 +52,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/multitenancy/new-tenant.mdx b/v2/multitenancy/new-tenant.mdx index 4aee19862..de6b2314f 100644 --- a/v2/multitenancy/new-tenant.mdx +++ b/v2/multitenancy/new-tenant.mdx @@ -41,9 +41,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` @@ -168,9 +168,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` diff --git a/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx b/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx index 6ebd47e54..8beb49f2b 100644 --- a/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/passwordless/common-customizations/multi-tenancy/multi-app.mdx @@ -53,9 +53,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/src/plugins/codeTypeChecking/jsEnv/package.json b/v2/src/plugins/codeTypeChecking/jsEnv/package.json index 0beeb6026..39d9b1ad9 100644 --- a/v2/src/plugins/codeTypeChecking/jsEnv/package.json +++ b/v2/src/plugins/codeTypeChecking/jsEnv/package.json @@ -55,8 +55,8 @@ "react-router-dom5": "npm:react-router-dom@^5.3.0", "socket.io": "^4.6.1", "socketio": "^1.0.0", - "supertokens-auth-react": "^0.41.1", - "supertokens-node": "github:supertokens/supertokens-node#dashboard-api-impl", + "supertokens-auth-react": "^0.42.0", + "supertokens-node": "github:supertokens/supertokens-node#19.0", "supertokens-node7": "npm:supertokens-node@7.3", "supertokens-react-native": "^5.0.0", "supertokens-web-js": "^0.11.0", diff --git a/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx index 6ebd47e54..8beb49f2b 100644 --- a/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdparty/common-customizations/multi-tenancy/multi-app.mdx @@ -53,9 +53,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx index 6ebd47e54..8beb49f2b 100644 --- a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/multi-app.mdx @@ -53,9 +53,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. diff --git a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx index 7feeceb02..c4ff3878b 100644 --- a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx +++ b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/multi-app.mdx @@ -54,9 +54,9 @@ The built-in Factor IDs that can be used for `firstFactors` are: - Social login / enterprise SSO auth: `thirdparty` - Passwordless: - With email OTP: `otp-email` - - With SMS OTP: `sms-otp` + - With SMS OTP: `otp-phone` - With email magic link: `link-email` - - With SMS magic link: `sms-link` + - With SMS magic link: `link-phone` :::important Even if a login method is enabled for a tenant, you will still require to initialise the right recipe on the backend for sign up / in to be possible with that login method. For example, if for a tenant, you have enabled the passwordless login method, but don't use the passwordless (or a combination recipe that has passwordless) on the backend, then end users will not be able to sign up / in using the passwordless APIs cause those APIs won't be exposed via our backend SDK's middleware. From 0ca7d3df27a0c246e86d2e6eb839189e2098de16 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Tue, 16 Jul 2024 18:05:06 +0530 Subject: [PATCH 6/8] fix: pr comment --- .../multi-tenancy/new-tenant-config.mdx | 6 ------ v2/multitenancy/new-tenant.mdx | 6 ------ .../multi-tenancy/new-tenant-config.mdx | 6 ------ .../multi-tenancy/new-tenant-config.mdx | 6 ------ .../multi-tenancy/new-tenant-config.mdx | 6 ------ .../multi-tenancy/new-tenant-config.mdx | 6 ------ 6 files changed, 36 deletions(-) diff --git a/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx index a686bfa8f..b3fc5e613 100644 --- a/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/emailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -391,9 +391,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: @@ -457,9 +454,6 @@ else: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: diff --git a/v2/multitenancy/new-tenant.mdx b/v2/multitenancy/new-tenant.mdx index de6b2314f..d40e5b88f 100644 --- a/v2/multitenancy/new-tenant.mdx +++ b/v2/multitenancy/new-tenant.mdx @@ -413,9 +413,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: @@ -479,9 +476,6 @@ else: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: diff --git a/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx index 173d78922..4a64b7040 100644 --- a/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/passwordless/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -389,9 +389,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: @@ -455,9 +452,6 @@ else: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: diff --git a/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx index 52ca5e6d7..e832ba218 100644 --- a/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/thirdparty/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -559,9 +559,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: @@ -625,9 +622,6 @@ else: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: diff --git a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx index 9b4ad3c34..90da8dde5 100644 --- a/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -574,9 +574,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: @@ -640,9 +637,6 @@ else: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: diff --git a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx index 99a80a648..fab601f09 100644 --- a/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx +++ b/v2/thirdpartypasswordless/common-customizations/multi-tenancy/new-tenant-config.mdx @@ -566,9 +566,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: @@ -632,9 +629,6 @@ else: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to get the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: From 49a2fb7469c97913712b5bbe304652b57c1960f6 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Tue, 16 Jul 2024 18:06:35 +0530 Subject: [PATCH 7/8] fix: pr comment --- v2/multitenancy/list-tenants-and-apps.mdx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/v2/multitenancy/list-tenants-and-apps.mdx b/v2/multitenancy/list-tenants-and-apps.mdx index d11f973b7..f01dfae46 100644 --- a/v2/multitenancy/list-tenants-and-apps.mdx +++ b/v2/multitenancy/list-tenants-and-apps.mdx @@ -92,10 +92,6 @@ func main() { } ``` -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to list the tenants. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: - @@ -171,10 +167,6 @@ for tenant in response.tenants: -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to list the tenants. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: - From f6afdeecff24b44d188856800003ac33fba4241c Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Tue, 16 Jul 2024 18:09:45 +0530 Subject: [PATCH 8/8] fix: pr comment --- v2/multitenancy/new-tenant.mdx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/v2/multitenancy/new-tenant.mdx b/v2/multitenancy/new-tenant.mdx index d40e5b88f..3ac0eac6a 100644 --- a/v2/multitenancy/new-tenant.mdx +++ b/v2/multitenancy/new-tenant.mdx @@ -81,10 +81,6 @@ func main() { - In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party and passwordless login for this tenant. You can also disable any of these by setting the corresponding field to `false` (which is also the default setting). -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to create the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: - @@ -137,10 +133,6 @@ else: - In the above, we are creating a new tenant with the id `"customer1"`. We are also enabling the email password, third party and passwordless login for this tenant. You can also disable any of these by setting the corresponding field to `false` (which is also the default setting). -:::important -This SDK is still not up to date with the latest CDI, and hence, it uses the deprecated API to create the tenant. The deprecated API is backward compatible and should work with latest version of the core without any issues. -::: -