Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-web-js/recipe/multitenancy

References documentation for the supertokens-web-js/recipe/multitenancy package

Classes

default

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Constructors

Constructor
new default(): default;
Returns

default

Properties

Property Modifier Type Default value Defined in
AllowedDomainsClaim static AllowedDomainsClaimClass AllowedDomainsClaim tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Methods

getLoginMethods()
static getLoginMethods(input?): Promise<{
  fetchResponse: Response;
  firstFactors: string[];
  status: "OK";
  thirdParty: {
     providers: object[];
  };
}>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Gets enabled login methods and their configuration from the backend

Parameters
Parameter Type
input? { options?: RecipeFunctionOptions; tenantId?: string; userContext?: any; }
input.options? RecipeFunctionOptions
input.tenantId? string
input.userContext? any
Returns

Promise<{ fetchResponse: Response; firstFactors: string[]; status: "OK"; thirdParty: { providers: object[]; }; }>

{status: OK, emailpassword, passwordless, thirdParty} if successful

Throws

STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

getTenantId()
static getTenantId(input?): string | Promise<string>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Gets enabled login methods and their configuration from the backend

Parameters
Parameter Type
input? { userContext?: any; }
input.userContext? any
Returns

string | Promise<string>

Promise<string | undefined> | string | undefined

init()
static init(config?): CreateRecipeFunction<"GET_LOGIN_METHODS">;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Parameters
Parameter Type
config? UserInput
Returns

CreateRecipeFunction<"GET_LOGIN_METHODS">

Variables

AllowedDomainsClaim

const AllowedDomainsClaim: AllowedDomainsClaimClass;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/allowedDomainsClaim.ts


getLoginMethods()

const getLoginMethods: (input?) => Promise<{
  fetchResponse: Response;
  firstFactors: string[];
  status: "OK";
  thirdParty: {
     providers: object[];
  };
}> = RecipeWrapper.getLoginMethods;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Gets enabled login methods and their configuration from the backend

Parameters

Parameter Type
input? { options?: RecipeFunctionOptions; tenantId?: string; userContext?: any; }
input.options? RecipeFunctionOptions
input.tenantId? string
input.userContext? any

Returns

Promise<{ fetchResponse: Response; firstFactors: string[]; status: "OK"; thirdParty: { providers: object[]; }; }>

{status: OK, emailpassword, passwordless, thirdParty} if successful

Throws

STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"


getTenantId()

const getTenantId: (input?) => string | Promise<string> = RecipeWrapper.getTenantId;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Gets enabled login methods and their configuration from the backend

Parameters

Parameter Type
input? { userContext?: any; }
input.userContext? any

Returns

string | Promise<string>

Promise<string | undefined> | string | undefined


init()

const init: (config?) => CreateRecipeFunction<"GET_LOGIN_METHODS"> = RecipeWrapper.init;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts

Parameters

Parameter Type
config? UserInput

Returns

CreateRecipeFunction<"GET_LOGIN_METHODS">

References

PostAPIHookContext

Re-exports PostAPIHookContext


PreAndPostAPIHookAction

Re-exports PreAndPostAPIHookAction


PreAPIHookContext

Re-exports PreAPIHookContext


RecipeInterface

Re-exports RecipeInterface


UserInput

Re-exports UserInput

API reference

API schema and response details