supertokens-node
Preparing search index...
recipe/passwordless
APIInterface
Type Alias APIInterface
type
APIInterface
=
{
consumeCodePOST
?:
(
input
:
(
|
{
deviceId
:
string
;
preAuthSessionId
:
string
;
userInputCode
:
string
;
}
|
{
linkCode
:
string
;
preAuthSessionId
:
string
}
)
&
{
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
createdNewRecipeUser
:
boolean
;
session
:
SessionContainer
;
status
:
"OK"
;
user
:
User
;
}
|
{
failedCodeInputAttemptCount
:
number
;
maximumCodeInputAttempts
:
number
;
status
:
|
"INCORRECT_USER_INPUT_CODE_ERROR"
|
"EXPIRED_USER_INPUT_CODE_ERROR"
;
}
|
{
status
:
"RESTART_FLOW_ERROR"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
|
GeneralErrorResponse
,
>
;
createCodePOST
?:
(
input
:
(
{
email
:
string
}
|
{
phoneNumber
:
string
}
)
&
{
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
deviceId
:
string
;
flowType
:
|
"USER_INPUT_CODE"
|
"MAGIC_LINK"
|
"USER_INPUT_CODE_AND_MAGIC_LINK"
;
preAuthSessionId
:
string
;
status
:
"OK"
;
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
|
GeneralErrorResponse
,
>
;
emailExistsGET
?:
(
input
:
{
email
:
string
;
options
:
APIOptions
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
exists
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
>
;
phoneNumberExistsGET
?:
(
input
:
{
options
:
APIOptions
;
phoneNumber
:
string
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
exists
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
>
;
resendCodePOST
?:
(
input
:
{
deviceId
:
string
;
preAuthSessionId
:
string
}
&
{
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
GeneralErrorResponse
|
{
status
:
"RESTART_FLOW_ERROR"
|
"OK"
}
,
>
;
}
Index
Properties
consume
CodePOST?
create
CodePOST?
email
ExistsGET?
phone
Number
ExistsGET?
resend
CodePOST?
Properties
Optional
consume
CodePOST
consumeCodePOST
?:
(
input
:
(
|
{
deviceId
:
string
;
preAuthSessionId
:
string
;
userInputCode
:
string
}
|
{
linkCode
:
string
;
preAuthSessionId
:
string
}
)
&
{
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
createdNewRecipeUser
:
boolean
;
session
:
SessionContainer
;
status
:
"OK"
;
user
:
User
;
}
|
{
failedCodeInputAttemptCount
:
number
;
maximumCodeInputAttempts
:
number
;
status
:
|
"INCORRECT_USER_INPUT_CODE_ERROR"
|
"EXPIRED_USER_INPUT_CODE_ERROR"
;
}
|
{
status
:
"RESTART_FLOW_ERROR"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
|
GeneralErrorResponse
,
>
Optional
create
CodePOST
createCodePOST
?:
(
input
:
(
{
email
:
string
}
|
{
phoneNumber
:
string
}
)
&
{
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
deviceId
:
string
;
flowType
:
|
"USER_INPUT_CODE"
|
"MAGIC_LINK"
|
"USER_INPUT_CODE_AND_MAGIC_LINK"
;
preAuthSessionId
:
string
;
status
:
"OK"
;
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
|
GeneralErrorResponse
,
>
Optional
email
ExistsGET
emailExistsGET
?:
(
input
:
{
email
:
string
;
options
:
APIOptions
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
exists
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
>
Optional
phone
Number
ExistsGET
phoneNumberExistsGET
?:
(
input
:
{
options
:
APIOptions
;
phoneNumber
:
string
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
exists
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
>
Optional
resend
CodePOST
resendCodePOST
?:
(
input
:
{
deviceId
:
string
;
preAuthSessionId
:
string
}
&
{
options
:
APIOptions
;
session
:
SessionContainer
|
undefined
;
shouldTryLinkingWithSessionUser
:
boolean
|
undefined
;
tenantId
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
GeneralErrorResponse
|
{
status
:
"RESTART_FLOW_ERROR"
|
"OK"
}
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
consume
CodePOST
create
CodePOST
email
ExistsGET
phone
Number
ExistsGET
resend
CodePOST
supertokens-node
Loading...