Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

Re-exports RecipeFunctionOptions

Type Aliases

DeviceInfo: { deviceName: string; qrCodeString: string; secret: string }

Type declaration

  • deviceName: string
  • qrCodeString: string
  • secret: string
PostAPIHookContext: RecipePostAPIHookContext<PreAndPostAPIHookAction>
PreAPIHookContext: RecipePreAPIHookContext<PreAndPostAPIHookAction>
PreAndPostAPIHookAction: "CREATE_DEVICE" | "VERIFY_CODE" | "VERIFY_DEVICE" | "REMOVE_DEVICE" | "LIST_DEVICES"
RecipeInterface: { createDevice: any; listDevices: any; removeDevice: any; verifyCode: any; verifyDevice: any }

Type declaration

  • createDevice:function
    • 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" }>
    • Parameters

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

  • listDevices:function
    • listDevices(input: { options?: RecipeFunctionOptions; userContext: any }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
  • removeDevice:function
    • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
  • verifyCode:function
    • 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" }>
    • 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" }>

  • verifyDevice:function
    • 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" }>
    • 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" }>

UserInput: { override?: { functions?: any } } & RecipeModuleUserInput<PreAndPostAPIHookAction>

Functions

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

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

  • listDevices(input?: { options?: RecipeFunctionOptions; userContext?: any }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
  • 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" }>
  • 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" }>

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

Generated using TypeDoc