Search
Preparing search index...
The search index is not available
supertokens-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-node
recipe/emailpassword
Module recipe/emailpassword
Index
Classes
default
Interfaces
APIInterface
Recipe
Interface
Type aliases
APIOptions
User
Variables
Error
Functions
create
Email
Verification
Token
create
Reset
Password
Token
get
User
By
Email
get
User
By
Id
init
is
Email
Verified
reset
Password
Using
Token
revoke
Email
Verification
Tokens
sign
In
sign
Up
unverify
Email
update
Email
Or
Password
verify
Email
Using
Token
Type aliases
APIOptions
APIOptions
:
{
config
:
TypeNormalisedInput
;
emailVerificationRecipeImplementation
:
RecipeInterface
;
isInServerlessEnv
:
boolean
;
recipeId
:
string
;
recipeImplementation
:
RecipeInterface
;
req
:
BaseRequest
;
res
:
BaseResponse
}
Type declaration
config
:
TypeNormalisedInput
email
Verification
Recipe
Implementation
:
RecipeInterface
is
In
Serverless
Env
:
boolean
recipe
Id
:
string
recipe
Implementation
:
RecipeInterface
req
:
BaseRequest
res
:
BaseResponse
User
User
:
{
email
:
string
;
id
:
string
;
timeJoined
:
number
}
Type declaration
email
:
string
id
:
string
time
Joined
:
number
Variables
Error
Error
:
typeof
default
= ...
Functions
create
Email
Verification
Token
create
Email
Verification
Token
(
userId
:
string
)
:
Promise
<
{
status
:
"OK"
;
token
:
string
}
|
{
status
:
"EMAIL_ALREADY_VERIFIED_ERROR"
}
>
Parameters
userId:
string
Returns
Promise
<
{
status
:
"OK"
;
token
:
string
}
|
{
status
:
"EMAIL_ALREADY_VERIFIED_ERROR"
}
>
create
Reset
Password
Token
create
Reset
Password
Token
(
userId
:
string
)
:
Promise
<
{
status
:
"OK"
;
token
:
string
}
|
{
status
:
"UNKNOWN_USER_ID_ERROR"
}
>
Parameters
userId:
string
Returns
Promise
<
{
status
:
"OK"
;
token
:
string
}
|
{
status
:
"UNKNOWN_USER_ID_ERROR"
}
>
get
User
By
Email
get
User
By
Email
(
email
:
string
)
:
Promise
<
undefined
|
User
>
Parameters
email:
string
Returns
Promise
<
undefined
|
User
>
get
User
By
Id
get
User
By
Id
(
userId
:
string
)
:
Promise
<
undefined
|
User
>
Parameters
userId:
string
Returns
Promise
<
undefined
|
User
>
init
init
(
config
?:
TypeInput
)
:
RecipeListFunction
Parameters
Optional
config:
TypeInput
Returns
RecipeListFunction
is
Email
Verified
is
Email
Verified
(
userId
:
string
)
:
Promise
<
boolean
>
Parameters
userId:
string
Returns
Promise
<
boolean
>
reset
Password
Using
Token
reset
Password
Using
Token
(
token
:
string
, newPassword
:
string
)
:
Promise
<
{
status
:
"OK"
|
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
>
Parameters
token:
string
newPassword:
string
Returns
Promise
<
{
status
:
"OK"
|
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
>
revoke
Email
Verification
Tokens
revoke
Email
Verification
Tokens
(
userId
:
string
)
:
Promise
<
{
status
:
"OK"
}
>
Parameters
userId:
string
Returns
Promise
<
{
status
:
"OK"
}
>
sign
In
sign
In
(
email
:
string
, password
:
string
)
:
Promise
<
{
status
:
"OK"
;
user
:
User
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
>
Parameters
email:
string
password:
string
Returns
Promise
<
{
status
:
"OK"
;
user
:
User
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
>
sign
Up
sign
Up
(
email
:
string
, password
:
string
)
:
Promise
<
{
status
:
"OK"
;
user
:
User
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
>
Parameters
email:
string
password:
string
Returns
Promise
<
{
status
:
"OK"
;
user
:
User
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
>
unverify
Email
unverify
Email
(
userId
:
string
)
:
Promise
<
{
status
:
"OK"
}
>
Parameters
userId:
string
Returns
Promise
<
{
status
:
"OK"
}
>
update
Email
Or
Password
update
Email
Or
Password
(
input
:
{
email
?:
string
;
password
?:
string
;
userId
:
string
}
)
:
Promise
<
{
status
:
"OK"
|
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
}
>
Parameters
input:
{
email
?:
string
;
password
?:
string
;
userId
:
string
}
Optional
email
?:
string
Optional
password
?:
string
user
Id
:
string
Returns
Promise
<
{
status
:
"OK"
|
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
}
>
verify
Email
Using
Token
verify
Email
Using
Token
(
token
:
string
)
:
Promise
<
undefined
|
User
|
{
status
:
"EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"
}
>
Parameters
token:
string
Returns
Promise
<
undefined
|
User
|
{
status
:
"EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"
}
>
Modules
framework
framework/aws
Lambda
framework/express
framework/fastify
framework/hapi
framework/koa
framework/loopback
index
recipe/emailpassword
recipe/emailverification
recipe/jwt
recipe/session
recipe/thirdparty
recipe/thirdpartyemailpassword
default
APIInterface
Recipe
Interface
APIOptions
User
Error
create
Email
Verification
Token
create
Reset
Password
Token
get
User
By
Email
get
User
By
Id
init
is
Email
Verified
reset
Password
Using
Token
revoke
Email
Verification
Tokens
sign
In
sign
Up
unverify
Email
update
Email
Or
Password
verify
Email
Using
Token
Generated using
TypeDoc