Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • default

Index

Constructors

Properties

Apple: ((config: TypeThirdPartyProviderAppleConfig) => TypeProvider) = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: ((config: TypeThirdPartyProviderDiscordConfig) => TypeProvider) = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: ((config: TypeThirdPartyProviderFacebookConfig) => TypeProvider) = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: ((config: TypeThirdPartyProviderGithubConfig) => TypeProvider) = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: ((config: TypeThirdPartyProviderGoogleConfig) => TypeProvider) = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: ((config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider) = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: ((config: TypeInput) => RecipeListFunction) = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

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

    • userId: string
    • userContext: any = {}

    Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext: any }): Promise<void>
  • signInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

Generated using TypeDoc