Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

EmailVerificationClaim: EmailVerificationClaimClass = Recipe.EmailVerificationClaim

Methods

  • getEmailVerificationTokenFromURL(input?: { userContext?: any }): string
  • getTenantIdFromURL(input?: { userContext?: any }): undefined | string
  • Reads and returns the tenant id from the current URL

    Parameters

    • Optional input: { userContext?: any }
      • Optional userContext?: any

    Returns undefined | string

    The "tenantId" query parameter from the current location

  • init(config?: UserInput): CreateRecipeFunction<PreAndPostAPIHookAction>
  • isEmailVerified(input?: { options?: RecipeFunctionOptions; userContext?: any }): Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
  • Check if an email has been verified

    throws

    STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

    Parameters

    Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>

    {status: "OK", isVerified: boolean}

  • sendVerificationEmail(input?: { options?: RecipeFunctionOptions; userContext?: any }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • Send an email to the user for verification.

    throws

    STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

    Parameters

    Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>

    {status: "OK"} if successfull

  • verifyEmail(input?: { options?: RecipeFunctionOptions; userContext?: any }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
  • Verify an email

    throws

    STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

    Parameters

    Returns Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

    {status: "OK"} if successfull

Generated using TypeDoc