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

constructor

Properties

Static Apple

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

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Static Discord

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

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Static Error

Error: typeof default = ...

Static Facebook

Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = ...

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Static Github

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

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Static Google

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

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

Static GoogleWorkspaces

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

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

Static init

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

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

Static createEmailVerificationToken

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

Static createResetPasswordToken

  • createResetPasswordToken(userId: string): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>

Static getUserById

  • getUserById(userId: string): Promise<undefined | User>

Static getUserByThirdPartyInfo

  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string): Promise<undefined | User>

Static getUsersByEmail

  • getUsersByEmail(email: string): Promise<User[]>

Static isEmailVerified

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

Static resetPasswordUsingToken

  • resetPasswordUsingToken(token: string, newPassword: string): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

Static revokeEmailVerificationTokens

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

Static signIn

  • signIn(email: string, password: string): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>

Static signInUp

  • signInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { error: string; status: "FIELD_ERROR" }>
  • Parameters

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

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { error: string; status: "FIELD_ERROR" }>

Static signUp

  • signUp(email: string, password: string): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>

Static unverifyEmail

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

Static updateEmailOrPassword

  • updateEmailOrPassword(input: { email?: string; password?: string; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userId: string }
      • Optional email?: string
      • Optional password?: string
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

Static verifyEmailUsingToken

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

Generated using TypeDoc