supertokens-node
Preparing search index...
recipe/multitenancy
associateUserToTenant
Variable associateUserToTenant
associateUserToTenant
:
(
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"
}
,
>
= Wrapper.associateUserToTenant
Type declaration
(
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"
}
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
supertokens-node
Loading...