Search
Preparing search index...
The search index is not available
supertokens-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-node
recipe/thirdpartyemailpassword
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
Error
init
Methods
consume
Password
Reset
Token
create
Reset
Password
Link
create
Reset
Password
Token
email
Password
Sign
In
email
Password
Sign
Up
email
Password
Verify
Credentials
reset
Password
Using
Token
send
Email
send
Reset
Password
Email
third
Party
Get
Provider
third
Party
Manually
Create
Or
Update
User
update
Email
Or
Password
Constructors
constructor
new default
(
)
:
default
Returns
default
Properties
Static
Error
Error
:
typeof
default
= SuperTokensError
Static
init
init
:
(
(
config
?:
TypeInput
)
=>
RecipeListFunction
)
= Recipe.init
Type declaration
(
config
?:
TypeInput
)
:
RecipeListFunction
Parameters
Optional
config:
TypeInput
Returns
RecipeListFunction
Methods
Static
consume
Password
Reset
Token
consume
Password
Reset
Token
(
tenantId
:
string
, token
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
email
:
string
;
status
:
"OK"
;
userId
:
string
}
|
{
status
:
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
>
Parameters
tenantId:
string
token:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
email
:
string
;
status
:
"OK"
;
userId
:
string
}
|
{
status
:
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
>
Static
create
Reset
Password
Link
create
Reset
Password
Link
(
tenantId
:
string
, userId
:
string
, email
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
link
:
string
;
status
:
"OK"
}
|
{
status
:
"UNKNOWN_USER_ID_ERROR"
}
>
Parameters
tenantId:
string
userId:
string
email:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
link
:
string
;
status
:
"OK"
}
|
{
status
:
"UNKNOWN_USER_ID_ERROR"
}
>
Static
create
Reset
Password
Token
create
Reset
Password
Token
(
tenantId
:
string
, userId
:
string
, email
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
;
token
:
string
}
|
{
status
:
"UNKNOWN_USER_ID_ERROR"
}
>
Parameters
tenantId:
string
userId:
string
email:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
;
token
:
string
}
|
{
status
:
"UNKNOWN_USER_ID_ERROR"
}
>
Static
email
Password
Sign
In
email
Password
Sign
In
(
tenantId
:
string
, email
:
string
, password
:
string
, session
?:
undefined
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
>
email
Password
Sign
In
(
tenantId
:
string
, email
:
string
, password
:
string
, session
:
SessionContainer
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
|
{
reason
:
"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"EMAIL_VERIFICATION_REQUIRED"
|
"SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
;
status
:
"LINKING_TO_SESSION_USER_FAILED"
}
>
Parameters
tenantId:
string
email:
string
password:
string
Optional
session:
undefined
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
>
Parameters
tenantId:
string
email:
string
password:
string
session:
SessionContainer
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
|
{
reason
:
"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"EMAIL_VERIFICATION_REQUIRED"
|
"SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
;
status
:
"LINKING_TO_SESSION_USER_FAILED"
}
>
Static
email
Password
Sign
Up
email
Password
Sign
Up
(
tenantId
:
string
, email
:
string
, password
:
string
, session
?:
undefined
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
>
email
Password
Sign
Up
(
tenantId
:
string
, email
:
string
, password
:
string
, session
:
SessionContainer
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
|
{
reason
:
"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"EMAIL_VERIFICATION_REQUIRED"
|
"SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
;
status
:
"LINKING_TO_SESSION_USER_FAILED"
}
>
Parameters
tenantId:
string
email:
string
password:
string
Optional
session:
undefined
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
>
Parameters
tenantId:
string
email:
string
password:
string
session:
SessionContainer
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
|
{
reason
:
"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"EMAIL_VERIFICATION_REQUIRED"
|
"SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
;
status
:
"LINKING_TO_SESSION_USER_FAILED"
}
>
Static
email
Password
Verify
Credentials
email
Password
Verify
Credentials
(
tenantId
:
string
, email
:
string
, password
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
|
"WRONG_CREDENTIALS_ERROR"
}
>
Parameters
tenantId:
string
email:
string
password:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
|
"WRONG_CREDENTIALS_ERROR"
}
>
Static
reset
Password
Using
Token
reset
Password
Using
Token
(
tenantId
:
string
, token
:
string
, newPassword
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
|
"UNKNOWN_USER_ID_ERROR"
|
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
|
{
failureReason
:
string
;
status
:
"PASSWORD_POLICY_VIOLATED_ERROR"
}
>
Parameters
tenantId:
string
token:
string
newPassword:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
|
"UNKNOWN_USER_ID_ERROR"
|
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
|
{
failureReason
:
string
;
status
:
"PASSWORD_POLICY_VIOLATED_ERROR"
}
>
Static
send
Email
send
Email
(
input
:
TypeEmailPasswordPasswordResetEmailDeliveryInput
&
{
userContext
?:
Record
<
string
,
any
>
}
)
:
Promise
<
void
>
Parameters
input:
TypeEmailPasswordPasswordResetEmailDeliveryInput
&
{
userContext
?:
Record
<
string
,
any
>
}
Returns
Promise
<
void
>
Static
send
Reset
Password
Email
send
Reset
Password
Email
(
tenantId
:
string
, userId
:
string
, email
:
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
status
:
"OK"
|
"UNKNOWN_USER_ID_ERROR"
}
>
Parameters
tenantId:
string
userId:
string
email:
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
|
"UNKNOWN_USER_ID_ERROR"
}
>
Static
third
Party
Get
Provider
third
Party
Get
Provider
(
tenantId
:
string
, thirdPartyId
:
string
, clientType
:
undefined
|
string
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
undefined
|
TypeProvider
>
Parameters
tenantId:
string
thirdPartyId:
string
clientType:
undefined
|
string
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
undefined
|
TypeProvider
>
Static
third
Party
Manually
Create
Or
Update
User
third
Party
Manually
Create
Or
Update
User
(
tenantId
:
string
, thirdPartyId
:
string
, thirdPartyUserId
:
string
, email
:
string
, isVerified
:
boolean
, session
?:
undefined
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
>
third
Party
Manually
Create
Or
Update
User
(
tenantId
:
string
, thirdPartyId
:
string
, thirdPartyUserId
:
string
, email
:
string
, isVerified
:
boolean
, session
:
SessionContainer
, userContext
?:
Record
<
string
,
any
>
)
:
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
|
{
reason
:
"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"EMAIL_VERIFICATION_REQUIRED"
|
"SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
;
status
:
"LINKING_TO_SESSION_USER_FAILED"
}
>
Parameters
tenantId:
string
thirdPartyId:
string
thirdPartyUserId:
string
email:
string
isVerified:
boolean
Optional
session:
undefined
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
>
Parameters
tenantId:
string
thirdPartyId:
string
thirdPartyUserId:
string
email:
string
isVerified:
boolean
session:
SessionContainer
Optional
userContext:
Record
<
string
,
any
>
Returns
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
|
{
reason
:
"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
|
"EMAIL_VERIFICATION_REQUIRED"
|
"SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
;
status
:
"LINKING_TO_SESSION_USER_FAILED"
}
>
Static
update
Email
Or
Password
update
Email
Or
Password
(
input
:
{
applyPasswordPolicy
?:
boolean
;
email
?:
string
;
password
?:
string
;
recipeUserId
:
RecipeUserId
;
tenantIdForPasswordPolicy
?:
string
;
userContext
?:
Record
<
string
,
any
>
}
)
:
Promise
<
{
status
:
"OK"
|
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
}
|
{
failureReason
:
string
;
status
:
"PASSWORD_POLICY_VIOLATED_ERROR"
}
>
Parameters
input:
{
applyPasswordPolicy
?:
boolean
;
email
?:
string
;
password
?:
string
;
recipeUserId
:
RecipeUserId
;
tenantIdForPasswordPolicy
?:
string
;
userContext
?:
Record
<
string
,
any
>
}
Optional
apply
Password
Policy
?:
boolean
Optional
email
?:
string
Optional
password
?:
string
recipe
User
Id
:
RecipeUserId
Optional
tenant
Id
For
Password
Policy
?:
string
Optional
user
Context
?:
Record
<
string
,
any
>
Returns
Promise
<
{
status
:
"OK"
|
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
}
|
{
failureReason
:
string
;
status
:
"PASSWORD_POLICY_VIOLATED_ERROR"
}
>
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/openid
recipe/passwordless
recipe/session
recipe/thirdparty
recipe/thirdpartyemailpassword
recipe/thirdpartypasswordless
recipe/totp
recipe/usermetadata
recipe/userroles
default
constructor
Error
init
consume
Password
Reset
Token
create
Reset
Password
Link
create
Reset
Password
Token
email
Password
Sign
In
email
Password
Sign
Up
email
Password
Verify
Credentials
reset
Password
Using
Token
send
Email
send
Reset
Password
Email
third
Party
Get
Provider
third
Party
Manually
Create
Or
Update
User
update
Email
Or
Password
Generated using
TypeDoc