\ No newline at end of file
diff --git a/docs/classes/recipe_authRecipe.default.html b/docs/classes/recipe_authRecipe.default.html
index 65d88d13..04511f88 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 877ac97f..fef5350b 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 f7510ed7..487e70c9 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_passwordless.default.html b/docs/classes/recipe_passwordless.default.html
index d07baf87..2fd0f2b6 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 506addd8..11a58bb8 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 16b572b2..bea6145d 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 22298a02..4ec21e0e 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 405eafc0..954caef7 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 837ec75a..100aa4d5 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/modules/index.html b/docs/modules/index.html
index 8daa7097..ec9c6567 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 72b52ccb..96d600fd 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 3cc6365b..8baad91f 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_multitenancy.html b/docs/modules/recipe_multitenancy.html
index f4013fd6..34fa532f 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 bdbe44d5..9c867420 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; 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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" }>
-{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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{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" | "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 d4164974..93e3fe18 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_multitenancy.default.html b/docs/classes/recipe_multitenancy.default.html index c5426642..80e67cc2 100644 --- a/docs/classes/recipe_multitenancy.default.html +++ b/docs/classes/recipe_multitenancy.default.html @@ -1,8 +1,8 @@ -{status: "OK"}
if successfull- 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<{ emailPassword: { enabled: boolean }; fetchResponse: Response; passwordless: { enabled: boolean }; status: "OK"; thirdParty: { enabled: boolean; 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<{ createdNewUser: boolean; fetchResponse: Response; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" }>
-{status: "OK", user, createdNewUser: 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" }>
-{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<{ createdNewUser: boolean; fetchResponse: Response; status: "OK"; user: ThirdPartyUserType } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>
-{status: OK, user, createdNewUser: 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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" }>
-{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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{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; 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" | "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<{ createdNewUser: boolean; fetchResponse: Response; status: "OK"; user: ThirdPartyUserType } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>
{status: OK, user, createdNewUser: 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<{ createdNewUser: boolean; fetchResponse: Response; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" }>
-{status: "OK", user, createdNewUser: 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" }>
-{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<{ createdNewUser: boolean; fetchResponse: Response; status: "OK"; user: ThirdPartyUserType } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>
diff --git a/docs/classes/recipe_userroles.default.html b/docs/classes/recipe_userroles.default.html index 7cc8a7c0..9cfa25a8 100644 --- a/docs/classes/recipe_userroles.default.html +++ b/docs/classes/recipe_userroles.default.html @@ -1 +1 @@ -{status: OK, user, createdNewUser: boolean}
if succesful- 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; 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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" }>
-{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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{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" | "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
-{status: "OK"}
if successfullUser Input
User Type
Type declaration
email: string
id: string
time Joined: number
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; 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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" }>
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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
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" | "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
Generated using TypeDoc
User Input
User Type
Type declaration
email: string
id: string
time Joined: number
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; 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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" }>
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: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
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" | "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/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<{ emailPassword: { enabled: boolean }; fetchResponse: Response; passwordless: { enabled: boolean }; status: "OK"; thirdParty: { enabled: boolean; 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<{ emailPassword: { enabled: boolean }; fetchResponse: Response; passwordless: { enabled: boolean }; status: "OK"; thirdParty: { enabled: boolean; 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<{ emailPassword: { enabled: boolean }; fetchResponse: Response; passwordless: { enabled: boolean }; status: "OK"; thirdParty: { enabled: boolean; 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
Passwordless User
Type declaration
Optional email?: string
id: string
Optional phone Number?: string
time Joined: number
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
Passwordless User
Type declaration
Optional email?: string
id: string
Optional phone Number?: string
time Joined: number
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<{ createdNewUser: boolean; fetchResponse: Response; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" }>
-{status: "OK", user, createdNewUser: 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" }>
-{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
Reads and returns the link code from the current URL
Parameters
input: { userContext: any }
user Context: any
Returns string
The hash (#) property of the current URL
-get Login Attempt Info:function
get Login Attempt Info:function
Get information about the current login attempt from storage
Type Parameters
CustomLoginAttemptInfoProperties
Parameters
input: { userContext: any }
user Context: any
Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomLoginAttemptInfoProperties>
-{deviceId, preAuthSessionId, flowType}
if present, returns undefined otherwiseget Pre Auth Session Id FromURL:function
get Pre Auth Session Id FromURL:function
Reads and returns the pre auth session id from the current URL
Parameters
input: { userContext: any }
user