Search
Preparing search index...
The search index is not available
supertokens-auth-react
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-auth-react
recipe/passwordless
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
Components
Override
Provider
Methods
clear
Login
Attempt
Info
consume
Code
create
Code
does
Email
Exist
does
Phone
Number
Exist
get
Link
Code
FromURL
get
Login
Attempt
Info
get
Pre
Auth
Session
Id
FromURL
init
resend
Code
set
Login
Attempt
Info
sign
Out
Constructors
constructor
new default
(
)
:
default
Returns
default
Properties
Static
Components
Override
Provider
Components
Override
Provider
:
FC
<
PropsWithChildren
<
{
components
:
ComponentOverrideMap
}
>
>
= RecipeComponentsOverrideContextProvider
Methods
Static
clear
Login
Attempt
Info
clear
Login
Attempt
Info
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
void
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
void
>
Static
consume
Code
consume
Code
(
input
?:
{
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
;
userInputCode
:
string
}
|
{
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
}
)
:
Promise
<
{
createdNewRecipeUser
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
failedCodeInputAttemptCount
:
number
;
fetchResponse
:
Response
;
maximumCodeInputAttempts
:
number
;
status
:
"INCORRECT_USER_INPUT_CODE_ERROR"
|
"EXPIRED_USER_INPUT_CODE_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"RESTART_FLOW_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
>
Parameters
Optional
input:
{
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
;
userInputCode
:
string
}
|
{
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
}
Returns
Promise
<
{
createdNewRecipeUser
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
failedCodeInputAttemptCount
:
number
;
fetchResponse
:
Response
;
maximumCodeInputAttempts
:
number
;
status
:
"INCORRECT_USER_INPUT_CODE_ERROR"
|
"EXPIRED_USER_INPUT_CODE_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"RESTART_FLOW_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
>
Static
create
Code
create
Code
(
input
:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
?:
UserContext
}
|
{
options
?:
RecipeFunctionOptions
;
phoneNumber
:
string
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
?:
UserContext
}
)
:
Promise
<
{
deviceId
:
string
;
fetchResponse
:
Response
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
;
status
:
"OK"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
>
Parameters
input:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
?:
UserContext
}
|
{
options
?:
RecipeFunctionOptions
;
phoneNumber
:
string
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
?:
UserContext
}
Returns
Promise
<
{
deviceId
:
string
;
fetchResponse
:
Response
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
;
status
:
"OK"
}
|
{
reason
:
string
;
status
:
"SIGN_IN_UP_NOT_ALLOWED"
}
>
Static
does
Email
Exist
does
Email
Exist
(
input
:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
}
)
:
Promise
<
{
doesExist
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
}
>
Parameters
input:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
}
email
:
string
Optional
options
?:
RecipeFunctionOptions
Optional
user
Context
?:
UserContext
Returns
Promise
<
{
doesExist
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
}
>
Static
does
Phone
Number
Exist
does
Phone
Number
Exist
(
input
:
{
options
?:
RecipeFunctionOptions
;
phoneNumber
:
string
;
userContext
?:
UserContext
}
)
:
Promise
<
{
doesExist
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
}
>
Parameters
input:
{
options
?:
RecipeFunctionOptions
;
phoneNumber
:
string
;
userContext
?:
UserContext
}
Optional
options
?:
RecipeFunctionOptions
phone
Number
:
string
Optional
user
Context
?:
UserContext
Returns
Promise
<
{
doesExist
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
}
>
Static
get
Link
Code
FromURL
get
Link
Code
FromURL
(
input
?:
{
userContext
?:
UserContext
}
)
:
string
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
string
Static
get
Login
Attempt
Info
get
Login
Attempt
Info
<
CustomLoginAttemptInfoProperties
>
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
undefined
|
{
deviceId
:
string
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
}
&
CustomLoginAttemptInfoProperties
>
Type Parameters
CustomLoginAttemptInfoProperties
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
undefined
|
{
deviceId
:
string
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
}
&
CustomLoginAttemptInfoProperties
>
Static
get
Pre
Auth
Session
Id
FromURL
get
Pre
Auth
Session
Id
FromURL
(
input
?:
{
userContext
?:
UserContext
}
)
:
string
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
string
Static
init
init
(
config
:
UserInput
)
:
RecipeInitResult
<
never
,
PreAndPostAPIHookAction
,
OnHandleEventContext
,
NormalisedConfig
>
Parameters
config:
UserInput
Returns
RecipeInitResult
<
never
,
PreAndPostAPIHookAction
,
OnHandleEventContext
,
NormalisedConfig
>
Static
resend
Code
resend
Code
(
input
?:
{
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
}
)
:
Promise
<
{
fetchResponse
:
Response
;
status
:
"OK"
|
"RESTART_FLOW_ERROR"
}
>
Parameters
Optional
input:
{
options
?:
RecipeFunctionOptions
;
userContext
?:
UserContext
}
Optional
options
?:
RecipeFunctionOptions
Optional
user
Context
?:
UserContext
Returns
Promise
<
{
fetchResponse
:
Response
;
status
:
"OK"
|
"RESTART_FLOW_ERROR"
}
>
Static
set
Login
Attempt
Info
set
Login
Attempt
Info
<
CustomStateProperties
>
(
input
:
{
attemptInfo
:
{
deviceId
:
string
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
}
&
CustomStateProperties
;
userContext
?:
UserContext
}
)
:
Promise
<
void
>
Type Parameters
CustomStateProperties
Parameters
input:
{
attemptInfo
:
{
deviceId
:
string
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
}
&
CustomStateProperties
;
userContext
?:
UserContext
}
attempt
Info
:
{
deviceId
:
string
;
flowType
:
PasswordlessFlowType
;
preAuthSessionId
:
string
}
&
CustomStateProperties
Optional
user
Context
?:
UserContext
Returns
Promise
<
void
>
Static
sign
Out
sign
Out
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
void
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
void
>
Modules
date
Provider
index
recipe/auth
Recipe
recipe/emailpassword
recipe/emailverification
recipe/multifactorauth
recipe/multitenancy
recipe/oauth2provider
recipe/passwordless
recipe/recipe
Module
recipe/session
recipe/thirdparty
recipe/totp
recipe/userroles
default
constructor
Components
Override
Provider
clear
Login
Attempt
Info
consume
Code
create
Code
does
Email
Exist
does
Phone
Number
Exist
get
Link
Code
FromURL
get
Login
Attempt
Info
get
Pre
Auth
Session
Id
FromURL
init
resend
Code
set
Login
Attempt
Info
sign
Out
Generated using
TypeDoc