These are the SDK reference docs. If you’re looking for docs to implement SuperTokens, you might want to check out the User Guides

Module recipe/emailverification

Index

Type aliases

APIOptions

APIOptions: { config: TypeNormalisedInput; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

User

User: { email: string; id: string }

Type declaration

  • email: string
  • id: string

Variables

Error

Error: typeof default = ...

Functions

createEmailVerificationToken

  • createEmailVerificationToken(userId: string, email: string): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

init

  • init(config: TypeInput): RecipeListFunction

isEmailVerified

  • isEmailVerified(userId: string, email: string): Promise<boolean>

revokeEmailVerificationTokens

  • revokeEmailVerificationTokens(userId: string, email: string): Promise<{ status: "OK" }>

unverifyEmail

  • unverifyEmail(userId: string, email: string): Promise<{ status: "OK" }>

verifyEmailUsingToken

  • verifyEmailUsingToken(token: string): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Generated using TypeDoc