Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Methods

  • createDevice(input?: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: any }): Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
  • Creates a new unverified device.

    Parameters

    Returns Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>

    { status: "OK", ...} if successful along a description of the created device (secret, etc.)

  • listDevices(input?: { options?: RecipeFunctionOptions; userContext?: any }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
  • Lists all TOTP devices of the current user

    Parameters

    Returns Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>

    { status: "OK", ...} if successful with a list of devices in the devices prop

  • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: any }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
  • verifyCode(input: { options?: RecipeFunctionOptions; totp: string; userContext?: any }): Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Verifies that the totp code belongs to a verified device of the current user

    Parameters

    Returns Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

    { status: "OK", ...} if successful

  • verifyDevice(input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: any }): Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Verifies the totp device for the current user

    Parameters

    Returns Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

    { status: "OK", ...} if successful

Generated using TypeDoc