EmailVerification
Classes
default
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:21
Constructors
Constructor
new default(): default;
Returns
Properties
Methods
getEmailVerificationTokenFromURL()
static getEmailVerificationTokenFromURL(input?): string;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:94
Parameters
Returns
string
getTenantIdFromURL()
static getTenantIdFromURL(input?): string;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:108
Reads and returns the tenant id from the current URL
Parameters
Returns
string
The "tenantId" query parameter from the current location
init()
static init(config?): CreateRecipeFunction<PreAndPostAPIHookAction>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:24
Parameters
Returns
CreateRecipeFunction<PreAndPostAPIHookAction>
isEmailVerified()
static isEmailVerified(input?): Promise<{
fetchResponse: Response;
isVerified: boolean;
status: "OK";
}>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:83
Check if an email has been verified
Parameters
Returns
Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK"; }>
{status: "OK", isVerified: boolean}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
sendVerificationEmail()
static sendVerificationEmail(input?): Promise<{
fetchResponse: Response;
status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR";
}>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:62
Send an email to the user for verification.
Parameters
Returns
Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR"; }>
{status: "OK"} if successfull
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
verifyEmail()
static verifyEmail(input?): Promise<{
fetchResponse: Response;
status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR";
}>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:40
Verify an email
Parameters
Returns
Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"; }>
{status: "OK"} if successfull
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
EmailVerificationClaimClass
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/emailVerificationClaim.ts:13
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.
Extends
Constructors
Constructor
new EmailVerificationClaimClass(getRecipeImpl): EmailVerificationClaimClass;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/emailVerificationClaim.ts:14
Parameters
Returns
Overrides
Properties
Methods
getLastFetchedTime()
getLastFetchedTime(payload, _userContext?): number;
Defined in: node_modules/supertokens-website/lib/build/claims/primitiveClaim.d.ts:13
Parameters
Returns
number
Inherited from
BooleanClaim.getLastFetchedTime
getValueFromPayload()
getValueFromPayload(payload, _userContext?): boolean;
Defined in: node_modules/supertokens-website/lib/build/claims/primitiveClaim.d.ts:12
Parameters
Returns
boolean
Inherited from
BooleanClaim.getValueFromPayload
Variables
EmailVerificationClaim
const EmailVerificationClaim: EmailVerificationClaimClass = RecipeWrapper.EmailVerificationClaim;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:122
getEmailVerificationTokenFromURL()
const getEmailVerificationTokenFromURL: (input?) => string = RecipeWrapper.getEmailVerificationTokenFromURL;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:120
Parameters
Returns
string
getTenantIdFromURL()
const getTenantIdFromURL: (input?) => string = RecipeWrapper.getTenantIdFromURL;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:121
Reads and returns the tenant id from the current URL
Parameters
Returns
string
The "tenantId" query parameter from the current location
init()
const init: (config?) => CreateRecipeFunction<PreAndPostAPIHookAction> = RecipeWrapper.init;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:116
Parameters
Returns
CreateRecipeFunction<PreAndPostAPIHookAction>
isEmailVerified()
const isEmailVerified: (input?) => Promise<{
fetchResponse: Response;
isVerified: boolean;
status: "OK";
}> = RecipeWrapper.isEmailVerified;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:119
Check if an email has been verified
Parameters
Returns
Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK"; }>
{status: "OK", isVerified: boolean}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
sendVerificationEmail()
const sendVerificationEmail: (input?) => Promise<{
fetchResponse: Response;
status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR";
}> = RecipeWrapper.sendVerificationEmail;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:118
Send an email to the user for verification.
Parameters
Returns
Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR"; }>
{status: "OK"} if successfull
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
verifyEmail()
const verifyEmail: (input?) => Promise<{
fetchResponse: Response;
status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR";
}> = RecipeWrapper.verifyEmail;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailverification/index.ts:117
Verify an email
Parameters
Returns
Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"; }>
{status: "OK"} if successfull
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
References
PostAPIHookContext
Re-exports PostAPIHookContext
PreAPIHookContext
Re-exports PreAPIHookContext
RecipeFunctionOptions
Re-exports RecipeFunctionOptions
RecipeInterface
Re-exports RecipeInterface
UserInput
Re-exports UserInput