Search
Preparing search index...
The search index is not available
supertokens-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-node
recipe/multitenancy
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
init
Methods
associate
User
To
Tenant
create
Or
Update
Tenant
create
Or
Update
Third
Party
Config
delete
Tenant
delete
Third
Party
Config
disassociate
User
From
Tenant
get
Tenant
list
All
Tenants
Constructors
constructor
new default
(
)
:
default
Returns
default
Properties
Static
init
init
:
(
(
config
?:
TypeInput
)
=>
RecipeListFunction
)
= Recipe.init
Type declaration
(
config
?:
TypeInput
)
:
RecipeListFunction
Parameters
Optional
config:
TypeInput
Returns
RecipeListFunction
Methods
Static
associate
User
To
Tenant
associate
User
To
Tenant
(
tenantId
:
string
, recipeUserId
:
RecipeUserId
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
;
wasAlreadyAssociated
:
boolean
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
|
"PHONE_NUMBER_ALREADY_EXISTS_ERROR"
|
"THIRD_PARTY_USER_ALREADY_EXISTS_ERROR"
}
|
{
reason
:
string
;
status
:
"ASSOCIATION_NOT_ALLOWED_ERROR"
}
>
Parameters
tenantId:
string
recipeUserId:
RecipeUserId
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
;
wasAlreadyAssociated
:
boolean
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
|
"PHONE_NUMBER_ALREADY_EXISTS_ERROR"
|
"THIRD_PARTY_USER_ALREADY_EXISTS_ERROR"
}
|
{
reason
:
string
;
status
:
"ASSOCIATION_NOT_ALLOWED_ERROR"
}
>
Static
create
Or
Update
Tenant
create
Or
Update
Tenant
(
tenantId
:
string
, config
?:
{
coreConfig
?:
{}
;
firstFactors
?:
null
|
string
[]
;
requiredSecondaryFactors
?:
null
|
string
[]
}
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
createdNew
:
boolean
;
status
:
"OK"
}
>
Parameters
tenantId:
string
Optional
config:
{
coreConfig
?:
{}
;
firstFactors
?:
null
|
string
[]
;
requiredSecondaryFactors
?:
null
|
string
[]
}
Optional
core
Config
?:
{}
[
key:
string
]:
any
Optional
first
Factors
?:
null
|
string
[]
Optional
required
Secondary
Factors
?:
null
|
string
[]
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
createdNew
:
boolean
;
status
:
"OK"
}
>
Static
create
Or
Update
Third
Party
Config
create
Or
Update
Third
Party
Config
(
tenantId
:
string
, config
:
ProviderConfig
, skipValidation
?:
boolean
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
createdNew
:
boolean
;
status
:
"OK"
}
>
Parameters
tenantId:
string
config:
ProviderConfig
Optional
skipValidation:
boolean
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
createdNew
:
boolean
;
status
:
"OK"
}
>
Static
delete
Tenant
delete
Tenant
(
tenantId
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
didExist
:
boolean
;
status
:
"OK"
}
>
Parameters
tenantId:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
didExist
:
boolean
;
status
:
"OK"
}
>
Static
delete
Third
Party
Config
delete
Third
Party
Config
(
tenantId
:
string
, thirdPartyId
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
didConfigExist
:
boolean
;
status
:
"OK"
}
>
Parameters
tenantId:
string
thirdPartyId:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
didConfigExist
:
boolean
;
status
:
"OK"
}
>
Static
disassociate
User
From
Tenant
disassociate
User
From
Tenant
(
tenantId
:
string
, recipeUserId
:
RecipeUserId
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
;
wasAssociated
:
boolean
}
>
Parameters
tenantId:
string
recipeUserId:
RecipeUserId
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
;
wasAssociated
:
boolean
}
>
Static
get
Tenant
get
Tenant
(
tenantId
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
undefined
|
{
status
:
"OK"
}
&
TenantConfig
>
Parameters
tenantId:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
undefined
|
{
status
:
"OK"
}
&
TenantConfig
>
Static
list
All
Tenants
list
All
Tenants
(
userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
;
tenants
:
(
{
tenantId
:
string
}
&
TenantConfig
)
[]
}
>
Parameters
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
;
tenants
:
(
{
tenantId
:
string
}
&
TenantConfig
)
[]
}
>
Modules
framework
framework/aws
Lambda
framework/custom
framework/express
framework/fastify
framework/hapi
framework/koa
framework/loopback
index
ingredients/emaildelivery
ingredients/smsdelivery
recipe/accountlinking
recipe/dashboard
recipe/emailpassword
recipe/emailverification
recipe/jwt
recipe/multifactorauth
recipe/multitenancy
recipe/oauth2provider
recipe/openid
recipe/passwordless
recipe/session
recipe/thirdparty
recipe/totp
recipe/usermetadata
recipe/userroles
default
constructor
init
associate
User
To
Tenant
create
Or
Update
Tenant
create
Or
Update
Third
Party
Config
delete
Tenant
delete
Third
Party
Config
disassociate
User
From
Tenant
get
Tenant
list
All
Tenants
Generated using
TypeDoc