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

  • RecipeInterface

Index

Methods

createResetPasswordToken

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

getUserByEmail

  • getUserByEmail(input: { email: string }): Promise<undefined | User>

getUserById

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

resetPasswordUsingToken

  • resetPasswordUsingToken(input: { newPassword: string; token: string }): Promise<{ status: "OK" | "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • Parameters

    • input: { newPassword: string; token: string }
      • newPassword: string
      • token: string

    Returns Promise<{ status: "OK" | "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

signIn

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

signUp

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

    • input: { email: string; password: string }
      • email: string
      • password: string

    Returns Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>

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" }>

Generated using TypeDoc