supertokens-node
Preparing search index...
recipe/emailpassword
APIInterface
Type Alias APIInterface
type
APIInterface
=
{
emailExistsGET
:
|
undefined
|
(
(
input
:
{
email
:
string
;
options
:
APIOptions
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
exists
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
>
)
;
generatePasswordResetTokenPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
status
:
"OK"
}
|
{
reason
:
string
;
status
:
"PASSWORD_RESET_NOT_ALLOWED"
}
|
GeneralErrorResponse
,
>
)
;
passwordResetPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
tenantId
:
string
;
token
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
email
:
string
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
|
{
failureReason
:
string
;
status
:
"PASSWORD_POLICY_VIOLATED_ERROR"
}
|
GeneralErrorResponse
,
>
)
;
signInPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
session
:
SessionContainer
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"SIGN_IN_NOT_ALLOWED"
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
|
GeneralErrorResponse
,
>
)
;
signUpPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
session
:
SessionContainer
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"SIGN_UP_NOT_ALLOWED"
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
|
GeneralErrorResponse
,
>
)
;
}
Index
Properties
email
ExistsGET
generate
Password
Reset
TokenPOST
password
ResetPOST
sign
InPOST
sign
UpPOST
Properties
email
ExistsGET
emailExistsGET
:
|
undefined
|
(
(
input
:
{
email
:
string
;
options
:
APIOptions
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
exists
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
>
)
generate
Password
Reset
TokenPOST
generatePasswordResetTokenPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
status
:
"OK"
}
|
{
reason
:
string
;
status
:
"PASSWORD_RESET_NOT_ALLOWED"
}
|
GeneralErrorResponse
,
>
)
password
ResetPOST
passwordResetPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
tenantId
:
string
;
token
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
email
:
string
;
status
:
"OK"
;
user
:
User
}
|
{
status
:
"RESET_PASSWORD_INVALID_TOKEN_ERROR"
}
|
{
failureReason
:
string
;
status
:
"PASSWORD_POLICY_VIOLATED_ERROR"
}
|
GeneralErrorResponse
,
>
)
sign
InPOST
signInPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
session
:
SessionContainer
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"SIGN_IN_NOT_ALLOWED"
}
|
{
status
:
"WRONG_CREDENTIALS_ERROR"
}
|
GeneralErrorResponse
,
>
)
sign
UpPOST
signUpPOST
:
|
undefined
|
(
(
input
:
{
formFields
:
{
id
:
string
;
value
:
unknown
}
[]
;
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
session
:
SessionContainer
;
status
:
"OK"
;
user
:
User
}
|
{
reason
:
string
;
status
:
"SIGN_UP_NOT_ALLOWED"
}
|
{
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
|
GeneralErrorResponse
,
>
)
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
email
ExistsGET
generate
Password
Reset
TokenPOST
password
ResetPOST
sign
InPOST
sign
UpPOST
supertokens-node
Loading...