Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/emailverification

Index

Type Aliases

GetRedirectionURLContext: { action: "VERIFY_EMAIL" }

Type declaration

  • action: "VERIFY_EMAIL"
OnHandleEventContext: { action: "VERIFY_EMAIL_SENT" | "EMAIL_VERIFIED_SUCCESSFUL"; userContext: UserContext }

Type declaration

  • action: "VERIFY_EMAIL_SENT" | "EMAIL_VERIFIED_SUCCESSFUL"
  • userContext: UserContext
PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string; userContext: UserContext }

Type declaration

  • action: PreAndPostAPIHookAction
  • requestInit: RequestInit
  • url: string
  • userContext: UserContext
RecipeInterface: { getEmailVerificationTokenFromURL: any; getTenantIdFromURL: any; isEmailVerified: any; sendVerificationEmail: any; verifyEmail: any }

Type declaration

  • getEmailVerificationTokenFromURL:function
    • getEmailVerificationTokenFromURL(input: { userContext: any }): string
  • getTenantIdFromURL:function
    • getTenantIdFromURL(input: { userContext: any }): undefined | string
  • isEmailVerified:function
    • 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

      • input: { options?: RecipeFunctionOptions; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • userContext: any

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

      {status: "OK", isVerified: boolean}

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

      throws

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

      Parameters

      • input: { options?: RecipeFunctionOptions; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • userContext: any

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

      {status: "OK"} if successfull

  • verifyEmail:function
    • 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

      • input: { options?: RecipeFunctionOptions; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • userContext: any

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

      {status: "OK"} if successfull

UserInput: { disableDefaultUI?: boolean; mode?: "OPTIONAL" | "REQUIRED"; override?: { functions?: any }; sendVerifyEmailScreen?: FeatureBaseConfig; verifyEmailLinkClickedScreen?: FeatureBaseConfig } & RecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

EmailVerificationClaim: EmailVerificationClaimClass = EmailVerificationRecipe.EmailVerificationClaim
EmailVerificationComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = Wrapper.ComponentsOverrideProvider

Functions

  • getEmailVerificationTokenFromURL(input?: { userContext?: UserContext }): string
  • isEmailVerified(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
  • sendVerificationEmail(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • verifyEmail(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

Generated using TypeDoc