\ No newline at end of file
diff --git a/docs/classes/recipe_authRecipe.default.html b/docs/classes/recipe_authRecipe.default.html
index f5b0124a..b27f5558 100644
--- a/docs/classes/recipe_authRecipe.default.html
+++ b/docs/classes/recipe_authRecipe.default.html
@@ -1 +1 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_emailpassword.default.html b/docs/classes/recipe_emailpassword.default.html
index 5ae5983b..8851d0f3 100644
--- a/docs/classes/recipe_emailpassword.default.html
+++ b/docs/classes/recipe_emailpassword.default.html
@@ -1,26 +1,26 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_emailverification.default.html b/docs/classes/recipe_emailverification.default.html
index e0bc18b0..ea5041da 100644
--- a/docs/classes/recipe_emailverification.default.html
+++ b/docs/classes/recipe_emailverification.default.html
@@ -1,15 +1,15 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_multifactorauth.default.html b/docs/classes/recipe_multifactorauth.default.html
index ec4417ef..5ce94255 100644
--- a/docs/classes/recipe_multifactorauth.default.html
+++ b/docs/classes/recipe_multifactorauth.default.html
@@ -1,4 +1,4 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_multitenancy.default.html b/docs/classes/recipe_multitenancy.default.html
index 331e051a..54924cb0 100644
--- a/docs/classes/recipe_multitenancy.default.html
+++ b/docs/classes/recipe_multitenancy.default.html
@@ -1,8 +1,8 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_passwordless.default.html b/docs/classes/recipe_passwordless.default.html
index 663d0c5f..cd4d5b16 100644
--- a/docs/classes/recipe_passwordless.default.html
+++ b/docs/classes/recipe_passwordless.default.html
@@ -1,37 +1,37 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_recipeModule.default.html b/docs/classes/recipe_recipeModule.default.html
index 307274b6..ad0fe157 100644
--- a/docs/classes/recipe_recipeModule.default.html
+++ b/docs/classes/recipe_recipeModule.default.html
@@ -1 +1 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_session.default.html b/docs/classes/recipe_session.default.html
index f12df7d5..fca5243b 100644
--- a/docs/classes/recipe_session.default.html
+++ b/docs/classes/recipe_session.default.html
@@ -1 +1 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_thirdparty.default.html b/docs/classes/recipe_thirdparty.default.html
index 5a783221..536ca893 100644
--- a/docs/classes/recipe_thirdparty.default.html
+++ b/docs/classes/recipe_thirdparty.default.html
@@ -1,12 +1,12 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_thirdpartyemailpassword.default.html b/docs/classes/recipe_thirdpartyemailpassword.default.html
index 41fb4eec..99053675 100644
--- a/docs/classes/recipe_thirdpartyemailpassword.default.html
+++ b/docs/classes/recipe_thirdpartyemailpassword.default.html
@@ -1,37 +1,37 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_thirdpartypasswordless.default.html b/docs/classes/recipe_thirdpartypasswordless.default.html
index c1949f07..cf93a7a8 100644
--- a/docs/classes/recipe_thirdpartypasswordless.default.html
+++ b/docs/classes/recipe_thirdpartypasswordless.default.html
@@ -1,47 +1,47 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/classes/recipe_userroles.default.html b/docs/classes/recipe_userroles.default.html
index d1ec0d0b..f949ddc1 100644
--- a/docs/classes/recipe_userroles.default.html
+++ b/docs/classes/recipe_userroles.default.html
@@ -1 +1 @@
-default | supertokens-web-js
\ No newline at end of file
diff --git a/docs/modules/index.html b/docs/modules/index.html
index 6aa89ddc..935cf6ef 100644
--- a/docs/modules/index.html
+++ b/docs/modules/index.html
@@ -1 +1 @@
-index | supertokens-web-js
\ No newline at end of file
diff --git a/docs/modules/recipe_emailpassword.html b/docs/modules/recipe_emailpassword.html
index 749c0aef..66c54592 100644
--- a/docs/modules/recipe_emailpassword.html
+++ b/docs/modules/recipe_emailpassword.html
@@ -1,32 +1,32 @@
-recipe/emailpassword | supertokens-web-js
For the options object passed to recipe functions, we do not need a postAPIHook.
This is because these functions will be called manually, so the user always knows which API is called (making the
postAPIHook redundant). They can consume the networkResponse returned by recipe functions as a way to handle post
API logic
\ No newline at end of file
diff --git a/docs/modules/recipe_emailverification.html b/docs/modules/recipe_emailverification.html
index d5c93562..48166af8 100644
--- a/docs/modules/recipe_emailverification.html
+++ b/docs/modules/recipe_emailverification.html
@@ -1,19 +1,19 @@
-recipe/emailverification | supertokens-web-js
\ No newline at end of file
diff --git a/docs/modules/recipe_multifactorauth.html b/docs/modules/recipe_multifactorauth.html
index d52f56de..710923e4 100644
--- a/docs/modules/recipe_multifactorauth.html
+++ b/docs/modules/recipe_multifactorauth.html
@@ -1 +1 @@
-recipe/multifactorauth | supertokens-web-js
\ No newline at end of file
diff --git a/docs/modules/recipe_multitenancy.html b/docs/modules/recipe_multitenancy.html
index 0a829297..6860c789 100644
--- a/docs/modules/recipe_multitenancy.html
+++ b/docs/modules/recipe_multitenancy.html
@@ -1,5 +1,5 @@
-recipe/multitenancy | supertokens-web-js
\ No newline at end of file
diff --git a/docs/modules/recipe_passwordless.html b/docs/modules/recipe_passwordless.html
index a72bf9da..7622d27a 100644
--- a/docs/modules/recipe_passwordless.html
+++ b/docs/modules/recipe_passwordless.html
@@ -1,37 +1,37 @@
-recipe/passwordless | supertokens-web-js
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static does Email Exist
Check if an email exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any }
email: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
Static get Reset Password Token FromURL
Static get Reset Password Token FromURL
Reads and returns the reset password token from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
The "token" query parameter from the current location
-Static get Tenant Id FromURL
Static get Tenant Id FromURL
Reads and returns the tenant id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
The "tenantId" query parameter from the current location
-Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static send Password Reset Email
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static send Password Reset Email
Send an email to the user for password reset
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{status: "OK"}
if successfullStatic sign In
Static sign In
Sign in a user with email and password
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
-{status: "OK"}
if successfullStatic sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static sign Up
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static sign Up
Sign up a user with email and password
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
-{status: "OK"}
if successfullStatic submit New Password
Static submit New Password
Submit a new password for the user
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
diff --git a/docs/classes/recipe_emailverification.EmailVerificationClaimClass.html b/docs/classes/recipe_emailverification.EmailVerificationClaimClass.html index 255b9306..d0793308 100644 --- a/docs/classes/recipe_emailverification.EmailVerificationClaimClass.html +++ b/docs/classes/recipe_emailverification.EmailVerificationClaimClass.html @@ -1,5 +1,5 @@{status: "OK"}
if successfull- Preparing search index...
- The search index is not available
supertokens-web-jsClass EmailVerificationClaimClass
We include "Class" in the class name, because it makes it easier to import/use the right thing (the instance exported by the recipe) instead of this.
-Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
getRecipeImpl: (() => RecipeInterface)
Returns RecipeInterface
Returns EmailVerificationClaimClass
Properties
Readonly default Max Age In Seconds
Readonly id
Readonly refresh
Type declaration
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
getRecipeImpl: (() => RecipeInterface)
Returns RecipeInterface
Returns EmailVerificationClaimClass
Properties
Readonly default Max Age In Seconds
Readonly id
Readonly refresh
Type declaration
Makes an API call that will refresh the claim in the token.
-Parameters
userContext: any
Returns Promise<void>
validators
Methods
get Last Fetched Time
Parameters
payload: any
Optional _userContext: any
Returns undefined | number
get Value From Payload
Parameters
payload: any
Optional _userContext: any
Returns boolean
Generated using TypeDoc
Parameters
userContext: any
Returns Promise<void>
validators
Methods
get Last Fetched Time
Parameters
payload: any
Optional _userContext: any
Returns undefined | number
get Value From Payload
Parameters
payload: any
Optional _userContext: any
Returns boolean
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Returns default
Properties
Static Email Verification Claim
Methods
Static get Email Verification Token FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
Static get Tenant Id FromURL
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Returns default
Properties
Static Email Verification Claim
Methods
Static get Email Verification Token FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
Static get Tenant Id FromURL
Reads and returns the tenant id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
The "tenantId" query parameter from the current location
-Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static is Email Verified
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static is Email Verified
Check if an email has been verified
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
-{status: "OK", isVerified: boolean}
Static send Verification Email
Static send Verification Email
Send an email to the user for verification.
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
-{status: "OK"}
if successfullStatic verify Email
Static verify Email
Verify an email
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
diff --git a/docs/classes/recipe_multifactorauth.MultiFactorAuthClaimClass.html b/docs/classes/recipe_multifactorauth.MultiFactorAuthClaimClass.html index f8c0851a..42dbf556 100644 --- a/docs/classes/recipe_multifactorauth.MultiFactorAuthClaimClass.html +++ b/docs/classes/recipe_multifactorauth.MultiFactorAuthClaimClass.html @@ -1,3 +1,3 @@{status: "OK"}
if successfull- Preparing search index...
- The search index is not available
supertokens-web-jsClass MultiFactorAuthClaimClass
We include "Class" in the class name, because it makes it easier to import/use the right thing (the instance exported by the recipe) instead of this.
-Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
getRecipeImpl: (() => RecipeInterface)
Returns RecipeInterface
Returns MultiFactorAuthClaimClass
Properties
Protected get Recipe Impl
Type declaration
Returns RecipeInterface
id
validators
Type declaration
has Completed Factors:function
Parameters
requirements: MFARequirementList
Returns SessionClaimValidator
has CompletedMFARequirements For Auth:function
Returns SessionClaimValidator
Methods
get Last Fetched Time
Parameters
payload: any
Optional _userContext: any
Returns undefined | number
get Value From Payload
Parameters
payload: any
Optional _userContext: any
Returns undefined | { c: Record<string, undefined | number>; v: boolean }
refresh
Parameters
userContext: any
Returns Promise<void>
Generated using TypeDoc
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
getRecipeImpl: (() => RecipeInterface)
Returns RecipeInterface
Returns MultiFactorAuthClaimClass
Properties
Protected get Recipe Impl
Type declaration
Returns RecipeInterface
id
validators
Type declaration
has Completed Factors:function
Parameters
requirements: MFARequirementList
Returns SessionClaimValidator
has CompletedMFARequirements For Auth:function
Returns SessionClaimValidator
Methods
get Last Fetched Time
Parameters
payload: any
Optional _userContext: any
Returns undefined | number
get Value From Payload
Parameters
payload: any
Optional _userContext: any
Returns undefined | { c: Record<string, undefined | number>; v: boolean }
refresh
Parameters
userContext: any
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Returns default
Properties
Static Multi Factor Auth Claim
Methods
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_MFA_INFO">
Static resync Session And FetchMFAInfo
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Returns default
Properties
Static Multi Factor Auth Claim
Methods
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_MFA_INFO">
Static resync Session And FetchMFAInfo
Loads information about what factors the current session can set up/complete and updates the requirements in the session payload
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>
{ status: "OK", ...}
if successfulGenerated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Returns default
Properties
Static Allowed Domains Claim
Methods
Static get Login Methods
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Methods
Constructors
constructor
Returns default
Properties
Static Allowed Domains Claim
Methods
Static get Login Methods
Gets enabled login methods and their configuration from the backend
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; tenantId?: string; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional tenant Id?: string
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; firstFactors: string[]; status: "OK"; thirdParty: { providers: { id: string; name: string }[] } }>
-{status: OK, emailpassword, passwordless, thirdParty}
if successfulStatic get Tenant Id
Static get Tenant Id
Gets enabled login methods and their configuration from the backend
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string | Promise<undefined | string>
-Promise<string | undefined> | string | undefined
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_LOGIN_METHODS">
Generated using TypeDoc
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_LOGIN_METHODS">
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static clear Login Attempt Info
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static clear Login Attempt Info
Clear any information about login attempts from storage
-Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static consume Code
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static consume Code
Log the user in using the input code or link code
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: any }
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" }>
-{status: "OK", user, createdNewRecipeUser: bool}
if succesfulStatic create Code
Static create Code
Create and send a code to the user for passwordless auth
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: any }
Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
-{status: "OK", deviceId, preAuthSessionId, flowType}
If successfulStatic does Email Exist
Static does Email Exist
Check if a user with the given email exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any }
email: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
Static does Phone Number Exist
Static does Phone Number Exist
Check if a user with the given phone number exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: any }
Optional options?: RecipeFunctionOptions
phone Number: string
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
Static get Link Code FromURL
Static get Link Code FromURL
Reads and returns the link code from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
The hash (#) property of the current URL
-Static get Login Attempt Info
Static get Login Attempt Info
Get information about the current login attempt from storage
Type Parameters
CustomLoginAttemptInfoProperties
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomLoginAttemptInfoProperties>
-{deviceId, preAuthSessionId, flowType}
if present, returns undefined otherwiseStatic get Pre Auth Session Id FromURL
Static get Pre Auth Session Id FromURL
Reads and returns the pre auth session id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
The "preAuthSessionId" query parameter from the current URL
-Static get Tenant Id FromURL
Static get Tenant Id FromURL
Reads and returns the tenant id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
The "tenantId" query parameter from the current location
-Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static resend Code
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static resend Code
Resend the code to the user
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
-{status: "OK"}
if succesfulStatic set Login Attempt Info
Static set Login Attempt Info
Set information about the current login attempt to storage
-Type Parameters
CustomStateProperties
Parameters
input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: any }
attempt Info: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
Optional user Context?: any
Returns Promise<void>
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Generated using TypeDoc
Type Parameters
CustomStateProperties
Parameters
input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: any }
attempt Info: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
Optional user Context?: any
Returns Promise<void>
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default<Action, NormalisedConfig> Abstract
Type Parameters
Action
NormalisedConfig extends NormalisedRecipeConfig<Action>
Hierarchy
Index
Constructors
Properties
Constructors
constructor
Type Parameters
Action
NormalisedConfig extends NormalisedRecipeConfig<Action>
Parameters
config: NormalisedConfig
Returns default<Action, NormalisedConfig>
Properties
config
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default<Action, NormalisedConfig> Abstract
Type Parameters
Action
NormalisedConfig extends NormalisedRecipeConfig<Action>
Hierarchy
Index
Constructors
Properties
Constructors
constructor
Type Parameters
Action
NormalisedConfig extends NormalisedRecipeConfig<Action>
Parameters
config: NormalisedConfig
Returns default<Action, NormalisedConfig>
Properties
config
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static add Axios Interceptors
Parameters
axiosInstance: any
Optional userContext: any
Returns void
Static attempt Refreshing Session
Returns Promise<boolean>
Static does Session Exist
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<boolean>
Static get Access Token
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<undefined | string>
Static get Access Token Payload Securely
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<any>
Static get Claim Value
Type Parameters
T
Parameters
input: { claim: SessionClaim<T>; userContext?: any }
claim: SessionClaim<T>
Optional user Context?: any
Returns Promise<undefined | T>
Static get Invalid Claims From Response
Parameters
input: { response: Response | { data: any }; userContext?: any }
response: Response | { data: any }
Optional user Context?: any
Returns Promise<ClaimValidationError[]>
Static get User Id
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<string>
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<unknown>
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static validate Claims
Parameters
Optional input: { userContext?: any; overrideGlobalClaimValidators?: any }
Optional user Context?: any
override Global Claim Validators?:function
Parameters
globalClaimValidators: SessionClaimValidator[]
userContext: any
Returns SessionClaimValidator[]
Returns ClaimValidationError[] | Promise<ClaimValidationError[]>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static add Axios Interceptors
Parameters
axiosInstance: any
Optional userContext: any
Returns void
Static attempt Refreshing Session
Returns Promise<boolean>
Static does Session Exist
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<boolean>
Static get Access Token
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<undefined | string>
Static get Access Token Payload Securely
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<any>
Static get Claim Value
Type Parameters
T
Parameters
input: { claim: SessionClaim<T>; userContext?: any }
claim: SessionClaim<T>
Optional user Context?: any
Returns Promise<undefined | T>
Static get Invalid Claims From Response
Parameters
input: { response: Response | { data: any }; userContext?: any }
response: Response | { data: any }
Optional user Context?: any
Returns Promise<ClaimValidationError[]>
Static get User Id
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<string>
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<unknown>
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static validate Claims
Parameters
Optional input: { userContext?: any; overrideGlobalClaimValidators?: any }
Optional user Context?: any
override Global Claim Validators?:function
Parameters
globalClaimValidators: SessionClaimValidator[]
userContext: any
Returns SessionClaimValidator[]
Returns ClaimValidationError[] | Promise<ClaimValidationError[]>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static get AuthorisationURLWith Query Params And Set State
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static get AuthorisationURLWith Query Params And Set State
Get the URL that should be opened for third party authentication
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: any }
frontend RedirectURI: string
Optional options?: RecipeFunctionOptions
Optional redirectURIOn Provider Dashboard?: string
third Party Id: string
Optional user Context?: any
Returns Promise<string>
URL string
-Static get State And Other Info From Storage
Static get State And Other Info From Storage
Get the current login state from storage, this is also used when calling signInUp
Type Parameters
CustomStateProperties
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | StateObject & CustomStateProperties
State object from storage
-Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static sign In And Up
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static sign In And Up
Sign up/Sign in the user, this method uses the login attempt information from storage
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
-{status: OK, user, createdNewRecipeUser: boolean}
if successfulStatic sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Generated using TypeDoc
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static does Email Exist
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static does Email Exist
Check if an email exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any }
email: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
Static email Password Sign In
Static email Password Sign In
Sign in a user with email and password
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
-{status: "OK"}
if successfullStatic email Password Sign Up
Static email Password Sign Up
Sign up a user with email and password
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
-{status: "OK"}
if successfullStatic get AuthorisationURLWith Query Params And Set State
Static get AuthorisationURLWith Query Params And Set State
Get the URL that should be opened for third party authentication
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: any }
frontend RedirectURI: string
Optional options?: RecipeFunctionOptions
Optional redirectURIOn Provider Dashboard?: string
third Party Id: string
Optional user Context?: any
Returns Promise<string>
URL string
-Static get Reset Password Token FromURL
Static get Reset Password Token FromURL
Reads and returns the reset password token from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
The "token" query parameter from the current location
-Static get State And Other Info From Storage
Static get State And Other Info From Storage
Get the current login state from storage, this is also used when calling signInUp
Type Parameters
CustomStateProperties
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | StateObject & CustomStateProperties
State object from storage
-Static get Tenant Id FromURL
Static get Tenant Id FromURL
Reads and returns the tenant id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
The "tenantId" query parameter from the current location
-Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static send Password Reset Email
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static send Password Reset Email
Send an email to the user for password reset
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{status: "OK"}
if successfullStatic sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static submit New Password
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static submit New Password
Submit a new password for the user
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{status: "OK"}
if successfullStatic third Party Sign In And Up
Static third Party Sign In And Up
Sign up/Sign in the user, this method uses the login attempt information from storage
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
{status: OK, user, createdNewRecipeUser: boolean}
if succesfulGenerated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static clear Passwordless Login Attempt Info
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static clear Passwordless Login Attempt Info
Clear any information about login attempts from storage
-Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static consume Passwordless Code
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static consume Passwordless Code
Log the user in using the input code or link code
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: any }
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" }>
-{status: "OK", user, createdNewRecipeUser: bool}
if succesfulStatic create Passwordless Code
Static create Passwordless Code
Create and send a code to the user for passwordless auth
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: any }
Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
-{status: "OK", deviceId, preAuthSessionId, flowType}
If successfulStatic does Passwordless User Email Exist
Static does Passwordless User Email Exist
Check if a user with the given email exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any }
email: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
Static does Passwordless User Phone Number Exist
Static does Passwordless User Phone Number Exist
Check if a user with the given phone number exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: any }
Optional options?: RecipeFunctionOptions
phone Number: string
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
Static get Passwordless Link Code FromURL
Static get Passwordless Link Code FromURL
Reads and returns the link code from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
The hash (#) property of the current URL
-Static get Passwordless Login Attempt Info
Static get Passwordless Login Attempt Info
Get information about the current login attempt from storage
Type Parameters
CustomLoginAttemptInfoProperties
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId: undefined | string } & CustomLoginAttemptInfoProperties>
-{deviceId, preAuthSessionId, flowType}
if present, returns undefined otherwiseStatic get Passwordless Pre Auth Session Id FromURL
Static get Passwordless Pre Auth Session Id FromURL
Reads and returns the pre auth session id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
The "preAuthSessionId" query parameter from the current URL
-Static get Tenant Id FromURL
Static get Tenant Id FromURL
Reads and returns the tenant id from the current URL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
The "tenantId" query parameter from the current location
-Static get Third Party AuthorisationURLWith Query Params And Set State
Static get Third Party AuthorisationURLWith Query Params And Set State
Get the URL that should be opened for third party authentication
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: any }
frontend RedirectURI: string
Optional options?: RecipeFunctionOptions
Optional redirectURIOn Provider Dashboard?: string
third Party Id: string
Optional user Context?: any
Returns Promise<string>
URL string
-Static get Third Party State And Other Info From Storage
Static get Third Party State And Other Info From Storage
Get the current login state from storage, this is also used when calling signInUp
Type Parameters
CustomStateProperties
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | StateObject & CustomStateProperties
State object from storage
-Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static resend Passwordless Code
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static resend Passwordless Code
Resend the code to the user
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
-{status: "OK"}
if succesfulStatic set Passwordless Login Attempt Info
Static set Passwordless Login Attempt Info
Set information about the current login attempt to storage
-Type Parameters
CustomStateProperties
Parameters
input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: any }
attempt Info: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
Optional user Context?: any
Returns Promise<void>
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static third Party Sign In And Up
Type Parameters
CustomStateProperties
Parameters
input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: any }
attempt Info: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
Optional user Context?: any
Returns Promise<void>
Static sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
Static third Party Sign In And Up
Sign up/Sign in the user, this method uses the login attempt information from storage
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
diff --git a/docs/classes/recipe_totp.default.html b/docs/classes/recipe_totp.default.html index 43f0f7bf..e8b994f1 100644 --- a/docs/classes/recipe_totp.default.html +++ b/docs/classes/recipe_totp.default.html @@ -1,16 +1,16 @@ -{status: OK, user, createdNewRecipeUser: boolean}
if succesful- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static create Device
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns default
Methods
Static create Device
Creates a new unverified device.
Parameters
Optional input: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: any }
Optional device Name?: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
-{ status: "OK", ...}
if successful along a description of the created device (secret, etc.)Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static list Devices
Static init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
Static list Devices
Lists all TOTP devices of the current user
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
-{ status: "OK", ...}
if successful with a list of devices in thedevices
propStatic remove Device
Static remove Device
Removes a TOTP device
Parameters
input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: any }
device Name: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
-{ status: "OK", ...}
if successfulStatic verify Code
Static verify Code
Verifies that the totp code belongs to a verified device of the current user
Parameters
input: { options?: RecipeFunctionOptions; totp: string; userContext?: any }
Optional options?: RecipeFunctionOptions
totp: string
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
-{ status: "OK", ...}
if successfulStatic verify Device
Static verify Device
Verifies the totp device for the current user
Parameters
input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: any }
device Name: string
Optional options?: RecipeFunctionOptions
totp: string
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
{ status: "OK", ...}
if successfulGenerated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Constructors
constructor
Returns default
Properties
Static Permission Claim
Static User Role Claim
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsClass default
Hierarchy
Index
Constructors
Properties
Constructors
constructor
Returns default
Properties
Static Permission Claim
Static User Role Claim
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule index
Index
Classes
Functions
Functions
init
Parameters
config: SuperTokensConfig
Returns void
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule index
Index
Classes
Functions
Functions
init
Parameters
config: SuperTokensConfig
Returns void
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/emailpassword
Index
Classes
Type Aliases
Functions
Type Aliases
PostAPIHook Context
PreAPIHook Context
Recipe Function Options
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/emailpassword
Index
Classes
Type Aliases
Functions
Type Aliases
PostAPIHook Context
PreAPIHook Context
Recipe Function Options
For the options object passed to recipe functions, we do not need a postAPIHook.
This is because these functions will be called manually, so the user always knows which API is called (making the postAPIHook redundant). They can consume the networkResponse returned by recipe functions as a way to handle post API logic
-Type declaration
preAPIHook?:function
Parameters
input: { requestInit: RequestInit; url: string; userContext: any }
request Init: RequestInit
url: string
user Context: any
Returns Promise<{ requestInit: RequestInit; url: string }>
Recipe Interface
Type declaration
does Email Exist:function
Type declaration
preAPIHook?:function
Parameters
input: { requestInit: RequestInit; url: string; userContext: any }
request Init: RequestInit
url: string
user Context: any
Returns Promise<{ requestInit: RequestInit; url: string }>
Recipe Interface
Type declaration
does Email Exist:function
Check if an email exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext: any }
email: string
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
get Reset Password Token FromURL:function
get Reset Password Token FromURL:function
Reads and returns the reset password token from the current URL
Parameters
input: { userContext: any }
user Context: any
Returns string
The "token" query parameter from the current location
-get Tenant Id FromURL:function
get Tenant Id FromURL:function
Reads and returns the tenant id from the current URL
Parameters
input: { userContext: any }
user Context: any
Returns undefined | string
The "tenantId" query parameter from the current location
-send Password Reset Email:function
send Password Reset Email:function
Send an email to the user for password reset
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{status: "OK"}
if successfullsign In:function
sign In:function
Sign in a user with email and password
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
-{status: "OK"}
if successfullsign Up:function
sign Up:function
Sign up a user with email and password
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
-{status: "OK"}
if successfullsubmit New Password:function
submit New Password:function
Submit a new password for the user
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{status: "OK"}
if successfullUser Input
Functions
does Email Exist
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any }
email: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
get Reset Password Token FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
get Tenant Id FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
send Password Reset Email
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
sign In
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
sign Up
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
submit New Password
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
Generated using TypeDoc
User Input
Functions
does Email Exist
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext?: any }
email: string
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
get Reset Password Token FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
get Tenant Id FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
send Password Reset Email
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; reason: string; status: "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
sign In
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
sign Out
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns Promise<void>
sign Up
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
submit New Password
Parameters
input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: any }
form Fields: { id: string; value: string }[]
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/emailverification
Index
References
Classes
Type Aliases
Variables
Functions
References
Recipe Function Options
Re-exports RecipeFunctionOptionsType Aliases
PostAPIHook Context
PreAPIHook Context
Recipe Interface
Type declaration
get Email Verification Token FromURL:function
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/emailverification
Index
References
Classes
Type Aliases
Variables
Functions
References
Recipe Function Options
Re-exports RecipeFunctionOptionsType Aliases
PostAPIHook Context
PreAPIHook Context
Recipe Interface
Type declaration
get Email Verification Token FromURL:function
Reads and returns the email verification token from the current URL
Parameters
input: { userContext: any }
user Context: any
Returns string
The "token" query parameter from the current location
-get Tenant Id FromURL:function
get Tenant Id FromURL:function
Reads and returns the tenant id from the current URL
Parameters
input: { userContext: any }
user Context: any
Returns undefined | string
The "tenantId" query parameter from the current location
-is Email Verified:function
is Email Verified:function
Check if an email has been verified
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; userContext: any }
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
-{status: "OK", isVerified: boolean}
send Verification Email:function
send Verification Email:function
Send an email to the user for verification.
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; userContext: any }
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; status: "EMAIL_ALREADY_VERIFIED_ERROR" | "OK" }>
-{status: "OK"}
if successfullverify Email:function
verify Email:function
Verify an email
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; userContext: any }
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
-{status: "OK"}
if successfullUser Input
Variables
Const Email Verification Claim
Functions
get Email Verification Token FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
get Tenant Id FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
is Email Verified
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
send Verification Email
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
verify Email
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
Generated using TypeDoc
User Input
Variables
Const Email Verification Claim
Functions
get Email Verification Token FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns string
get Tenant Id FromURL
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<PreAndPostAPIHookAction>
is Email Verified
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
send Verification Email
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
verify Email
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/multifactorauth
Index
References
Classes
Type Aliases
Variables
Functions
References
Recipe Function Options
Re-exports RecipeFunctionOptionsType Aliases
PostAPIHook Context
PreAPIHook Context
Pre And PostAPIHook Action
Recipe Interface
Type declaration
resync Session And FetchMFAInfo:function
Parameters
input: { options?: RecipeFunctionOptions; userContext: any }
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ emails: Record<string, string[] | undefined>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, string[] | undefined>; status: "OK" }>
User Input
Variables
Const Multi Factor Auth Claim
Functions
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_MFA_INFO">
resync Session And FetchMFAInfo
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/multifactorauth
Index
References
Classes
Type Aliases
Variables
Functions
References
Recipe Function Options
Re-exports RecipeFunctionOptionsType Aliases
PostAPIHook Context
PreAPIHook Context
Pre And PostAPIHook Action
Recipe Interface
Type declaration
resync Session And FetchMFAInfo:function
Parameters
input: { options?: RecipeFunctionOptions; userContext: any }
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ emails: Record<string, string[] | undefined>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, string[] | undefined>; status: "OK" }>
User Input
Variables
Const Multi Factor Auth Claim
Functions
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_MFA_INFO">
resync Session And FetchMFAInfo
Parameters
Optional input: { options?: RecipeFunctionOptions; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional user Context?: any
Returns Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/multitenancy
Index
Classes
Type Aliases
Variables
Functions
Type Aliases
PostAPIHook Context
PreAPIHook Context
Pre And PostAPIHook Action
Recipe Interface
Type declaration
get Login Methods:function
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/multitenancy
Index
Classes
Type Aliases
Variables
Functions
Type Aliases
PostAPIHook Context
PreAPIHook Context
Pre And PostAPIHook Action
Recipe Interface
Type declaration
get Login Methods:function
Gets enabled login methods and their configuration
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; tenantId?: string; userContext: any }
Optional options?: RecipeFunctionOptions
Optional tenant Id?: string
user Context: any
Returns Promise<{ fetchResponse: Response; firstFactors: string[]; status: "OK"; thirdParty: { providers: { id: string; name: string }[] } }>
-{status: OK, emailpassword, passwordless, thirdParty}
if successfulget Tenant Id:function
Parameters
input: { userContext: any }
user Context: any
Returns undefined | string | Promise<undefined | string>
User Input
Variables
Const Allowed Domains Claim
Functions
get Login Methods
Parameters
Optional input: { options?: RecipeFunctionOptions; tenantId?: string; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional tenant Id?: string
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; firstFactors: string[]; status: "OK"; thirdParty: { providers: { id: string; name: string }[] } }>
get Tenant Id
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string | Promise<undefined | string>
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_LOGIN_METHODS">
Generated using TypeDoc
get Tenant Id:function
Parameters
input: { userContext: any }
user Context: any
Returns undefined | string | Promise<undefined | string>
User Input
Variables
Const Allowed Domains Claim
Functions
get Login Methods
Parameters
Optional input: { options?: RecipeFunctionOptions; tenantId?: string; userContext?: any }
Optional options?: RecipeFunctionOptions
Optional tenant Id?: string
Optional user Context?: any
Returns Promise<{ fetchResponse: Response; firstFactors: string[]; status: "OK"; thirdParty: { providers: { id: string; name: string }[] } }>
get Tenant Id
Parameters
Optional input: { userContext?: any }
Optional user Context?: any
Returns undefined | string | Promise<undefined | string>
init
Parameters
Optional config: UserInput
Returns CreateRecipeFunction<"GET_LOGIN_METHODS">
Generated using TypeDoc
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/passwordless
Index
References
Classes
Type Aliases
Functions
References
Recipe Function Options
Re-exports RecipeFunctionOptionsType Aliases
PostAPIHook Context
PreAPIHook Context
Pre And PostAPIHook Action
Recipe Interface
Type declaration
clear Login Attempt Info:function
- Preparing search index...
- The search index is not available
supertokens-web-jsModule recipe/passwordless
Index
References
Classes
Type Aliases
Functions
References
Recipe Function Options
Re-exports RecipeFunctionOptionsType Aliases
PostAPIHook Context
PreAPIHook Context
Pre And PostAPIHook Action
Recipe Interface
Type declaration
clear Login Attempt Info:function
Clear any information about login attempts from storage
-Parameters
input: { userContext: any }
user Context: any
Returns Promise<void>
consume Code:function
Parameters
input: { userContext: any }
user Context: any
Returns Promise<void>
consume Code:function
Log the user in using the input code or link code
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { deviceId: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any; userInputCode: string } | { linkCode: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any }
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" }>
-{status: "OK", user, createdNewRecipeUser: bool}
if succesfulcreate Code:function
create Code:function
Create and send a code to the user for passwordless auth
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext: any } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext: any }
Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
-{status: "OK", deviceId, preAuthSessionId, flowType}
If successfuldoes Email Exist:function
does Email Exist:function
Check if a user with the given email exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { email: string; options?: RecipeFunctionOptions; userContext: any }
email: string
Optional options?: RecipeFunctionOptions
user Context: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
does Phone Number Exist:function
does Phone Number Exist:function
Check if a user with the given phone number exists
STGeneralError if the API exposed by the backend SDKs returns
status: "GENERAL_ERROR"
Parameters
input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext: any }
Optional options?: RecipeFunctionOptions
phone Number: string
user Context: any
Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
-{status: "OK", doesExist: boolean}
get Link Code FromURL:function
get Link Code FromURL:function