Search
Preparing search index...
The search index is not available
supertokens-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-node
recipe/thirdpartypasswordless
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
Error
init
Methods
consume
Code
create
Code
create
Magic
Link
create
New
Code
For
Device
list
Codes
By
Device
Id
list
Codes
By
Email
list
Codes
By
Phone
Number
list
Codes
By
Pre
Auth
Session
Id
passwordless
Sign
In
Up
revoke
All
Codes
revoke
Code
send
Email
send
Sms
third
Party
Get
Provider
third
Party
Manually
Create
Or
Update
User
update
Passwordless
User
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
config:
TypeInput
Returns
RecipeListFunction
Methods
Static
consume
Code
consume
Code
(
input
:
{
deviceId
:
string
;
preAuthSessionId
:
string
;
tenantId
:
string
;
userContext
?:
any
;
userInputCode
:
string
}
|
{
linkCode
:
string
;
preAuthSessionId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
failedCodeInputAttemptCount
:
number
;
maximumCodeInputAttempts
:
number
;
status
:
"INCORRECT_USER_INPUT_CODE_ERROR"
|
"EXPIRED_USER_INPUT_CODE_ERROR"
}
|
{
status
:
"RESTART_FLOW_ERROR"
}
>
Parameters
input:
{
deviceId
:
string
;
preAuthSessionId
:
string
;
tenantId
:
string
;
userContext
?:
any
;
userInputCode
:
string
}
|
{
linkCode
:
string
;
preAuthSessionId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
Returns
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
"OK"
;
user
:
User
}
|
{
failedCodeInputAttemptCount
:
number
;
maximumCodeInputAttempts
:
number
;
status
:
"INCORRECT_USER_INPUT_CODE_ERROR"
|
"EXPIRED_USER_INPUT_CODE_ERROR"
}
|
{
status
:
"RESTART_FLOW_ERROR"
}
>
Static
create
Code
create
Code
(
input
:
(
{
email
:
string
}
&
{
tenantId
:
string
;
userContext
?:
any
;
userInputCode
?:
string
}
)
&
(
{
phoneNumber
:
string
}
&
{
tenantId
:
string
;
userContext
?:
any
;
userInputCode
?:
string
}
)
)
:
Promise
<
{
codeId
:
string
;
codeLifetime
:
number
;
deviceId
:
string
;
linkCode
:
string
;
preAuthSessionId
:
string
;
status
:
"OK"
;
timeCreated
:
number
;
userInputCode
:
string
}
>
Parameters
input:
(
{
email
:
string
}
&
{
tenantId
:
string
;
userContext
?:
any
;
userInputCode
?:
string
}
)
&
(
{
phoneNumber
:
string
}
&
{
tenantId
:
string
;
userContext
?:
any
;
userInputCode
?:
string
}
)
Returns
Promise
<
{
codeId
:
string
;
codeLifetime
:
number
;
deviceId
:
string
;
linkCode
:
string
;
preAuthSessionId
:
string
;
status
:
"OK"
;
timeCreated
:
number
;
userInputCode
:
string
}
>
Static
create
Magic
Link
create
Magic
Link
(
input
:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
|
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
string
>
Parameters
input:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
|
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
Returns
Promise
<
string
>
Static
create
New
Code
For
Device
create
New
Code
For
Device
(
input
:
{
deviceId
:
string
;
tenantId
:
string
;
userContext
?:
any
;
userInputCode
?:
string
}
)
:
Promise
<
{
codeId
:
string
;
codeLifetime
:
number
;
deviceId
:
string
;
linkCode
:
string
;
preAuthSessionId
:
string
;
status
:
"OK"
;
timeCreated
:
number
;
userInputCode
:
string
}
|
{
status
:
"RESTART_FLOW_ERROR"
|
"USER_INPUT_CODE_ALREADY_USED_ERROR"
}
>
Parameters
input:
{
deviceId
:
string
;
tenantId
:
string
;
userContext
?:
any
;
userInputCode
?:
string
}
device
Id
:
string
tenant
Id
:
string
Optional
user
Context
?:
any
Optional
user
Input
Code
?:
string
Returns
Promise
<
{
codeId
:
string
;
codeLifetime
:
number
;
deviceId
:
string
;
linkCode
:
string
;
preAuthSessionId
:
string
;
status
:
"OK"
;
timeCreated
:
number
;
userInputCode
:
string
}
|
{
status
:
"RESTART_FLOW_ERROR"
|
"USER_INPUT_CODE_ALREADY_USED_ERROR"
}
>
Static
list
Codes
By
Device
Id
list
Codes
By
Device
Id
(
input
:
{
deviceId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
undefined
|
DeviceType
>
Parameters
input:
{
deviceId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
device
Id
:
string
tenant
Id
:
string
Optional
user
Context
?:
any
Returns
Promise
<
undefined
|
DeviceType
>
Static
list
Codes
By
Email
list
Codes
By
Email
(
input
:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
DeviceType
[]
>
Parameters
input:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
email
:
string
tenant
Id
:
string
Optional
user
Context
?:
any
Returns
Promise
<
DeviceType
[]
>
Static
list
Codes
By
Phone
Number
list
Codes
By
Phone
Number
(
input
:
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
DeviceType
[]
>
Parameters
input:
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
phone
Number
:
string
tenant
Id
:
string
Optional
user
Context
?:
any
Returns
Promise
<
DeviceType
[]
>
Static
list
Codes
By
Pre
Auth
Session
Id
list
Codes
By
Pre
Auth
Session
Id
(
input
:
{
preAuthSessionId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
undefined
|
DeviceType
>
Parameters
input:
{
preAuthSessionId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
pre
Auth
Session
Id
:
string
tenant
Id
:
string
Optional
user
Context
?:
any
Returns
Promise
<
undefined
|
DeviceType
>
Static
passwordless
Sign
In
Up
passwordless
Sign
In
Up
(
input
:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
|
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
string
;
user
:
User
}
>
Parameters
input:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
|
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
Returns
Promise
<
{
createdNewRecipeUser
:
boolean
;
recipeUserId
:
RecipeUserId
;
status
:
string
;
user
:
User
}
>
Static
revoke
All
Codes
revoke
All
Codes
(
input
:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
|
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
{
status
:
"OK"
}
>
Parameters
input:
{
email
:
string
;
tenantId
:
string
;
userContext
?:
any
}
|
{
phoneNumber
:
string
;
tenantId
:
string
;
userContext
?:
any
}
Returns
Promise
<
{
status
:
"OK"
}
>
Static
revoke
Code
revoke
Code
(
input
:
{
codeId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
)
:
Promise
<
{
status
:
"OK"
}
>
Parameters
input:
{
codeId
:
string
;
tenantId
:
string
;
userContext
?:
any
}
code
Id
:
string
tenant
Id
:
string
Optional
user
Context
?:
any
Returns
Promise
<
{
status
:
"OK"
}
>
Static
send
Email
send
Email
(
input
:
TypePasswordlessEmailDeliveryInput
&
{
userContext
?:
any
}
)
:
Promise
<
void
>
Parameters
input:
TypePasswordlessEmailDeliveryInput
&
{
userContext
?:
any
}
Returns
Promise
<
void
>
Static
send
Sms
send
Sms
(
input
:
TypePasswordlessSmsDeliveryInput
&
{
userContext
?:
any
}
)
:
Promise
<
void
>
Parameters
input:
TypePasswordlessSmsDeliveryInput
&
{
userContext
?:
any
}
Returns
Promise
<
void
>
Static
third
Party
Get
Provider
third
Party
Get
Provider
(
tenantId
:
string
, thirdPartyId
:
string
, clientType
:
undefined
|
string
, userContext
?:
any
)
:
Promise
<
undefined
|
TypeProvider
>
Parameters
tenantId:
string
thirdPartyId:
string
clientType:
undefined
|
string
userContext:
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
, userContext
?:
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"
}
>
Parameters
tenantId:
string
thirdPartyId:
string
thirdPartyUserId:
string
email:
string
isVerified:
boolean
userContext:
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"
}
>
Static
update
Passwordless
User
update
Passwordless
User
(
input
:
{
email
?:
null
|
string
;
phoneNumber
?:
null
|
string
;
recipeUserId
:
RecipeUserId
;
userContext
?:
any
}
)
:
Promise
<
{
status
:
"OK"
|
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
|
"PHONE_NUMBER_ALREADY_EXISTS_ERROR"
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
|
"PHONE_NUMBER_CHANGE_NOT_ALLOWED_ERROR"
}
>
Parameters
input:
{
email
?:
null
|
string
;
phoneNumber
?:
null
|
string
;
recipeUserId
:
RecipeUserId
;
userContext
?:
any
}
Optional
email
?:
null
|
string
Optional
phone
Number
?:
null
|
string
recipe
User
Id
:
RecipeUserId
Optional
user
Context
?:
any
Returns
Promise
<
{
status
:
"OK"
|
"EMAIL_ALREADY_EXISTS_ERROR"
|
"UNKNOWN_USER_ID_ERROR"
|
"PHONE_NUMBER_ALREADY_EXISTS_ERROR"
}
|
{
reason
:
string
;
status
:
"EMAIL_CHANGE_NOT_ALLOWED_ERROR"
|
"PHONE_NUMBER_CHANGE_NOT_ALLOWED_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/multitenancy
recipe/openid
recipe/passwordless
recipe/session
recipe/thirdparty
recipe/thirdpartyemailpassword
recipe/thirdpartypasswordless
recipe/usermetadata
recipe/userroles
default
constructor
Error
init
consume
Code
create
Code
create
Magic
Link
create
New
Code
For
Device
list
Codes
By
Device
Id
list
Codes
By
Email
list
Codes
By
Phone
Number
list
Codes
By
Pre
Auth
Session
Id
passwordless
Sign
In
Up
revoke
All
Codes
revoke
Code
send
Email
send
Sms
third
Party
Get
Provider
third
Party
Manually
Create
Or
Update
User
update
Passwordless
User
Generated using
TypeDoc