Skip to main content
References

MultiTenancy

Classes

default

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

Constructors

Constructor
new default(): default;
Returns

default

Properties

PropertyModifierTypeDefault valueDefined in
AllowedDomainsClaimstaticAllowedDomainsClaimClassAllowedDomainsClaimtmp/supertokens-web-js/lib/ts/recipe/multitenancy/index.ts:70

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:40

Gets enabled login methods and their configuration from the backend

Parameters
ParameterType
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:64

Gets enabled login methods and their configuration from the backend

Parameters
ParameterType
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:23

Parameters
ParameterType
config?UserInput
Returns

CreateRecipeFunction<"GET_LOGIN_METHODS">

Variables

AllowedDomainsClaim

const AllowedDomainsClaim: AllowedDomainsClaimClass;

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

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:74

Gets enabled login methods and their configuration from the backend

Parameters

ParameterType
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:75

Gets enabled login methods and their configuration from the backend

Parameters

ParameterType
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:73

Parameters

ParameterType
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