Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

GetRedirectionURLContext: never
OnHandleEventContext: { action: "TOTP_CODE_VERIFIED"; userContext: UserContext } | { action: "TOTP_DEVICE_VERIFIED"; deviceName: string; userContext: UserContext; wasAlreadyVerified: boolean } | { action: "TOTP_DEVICE_CREATED"; deviceName: string; userContext: UserContext }
PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string; userContext: UserContext }

Type declaration

  • action: PreAndPostAPIHookAction
  • requestInit: RequestInit
  • url: string
  • userContext: UserContext
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

      • input: { deviceName?: string; options?: RecipeFunctionOptions; userContext: any }
        • Optional deviceName?: string
        • Optional options?: RecipeFunctionOptions
        • userContext: any

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

      • input: { options?: RecipeFunctionOptions; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • userContext: any

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

      • input: { deviceName: string; options?: RecipeFunctionOptions; userContext: any }
        • deviceName: string
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns 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

      • input: { options?: RecipeFunctionOptions; totp: string; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • totp: string
        • userContext: any

      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

      • input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext: any }
        • deviceName: string
        • Optional options?: RecipeFunctionOptions
        • totp: string
        • userContext: any

      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 }; totpMFAScreen?: Partial<TOTPMFAScreenConfig> } & RecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

TOTPComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = Wrapper.ComponentsOverrideProvider

Functions

  • createDevice(input?: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • Optional input: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional deviceName?: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • listDevices(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • deviceName: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>

  • verifyCode(input: { options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • totp: string
      • Optional userContext?: UserContext

    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?: UserContext }): 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

    • input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }
      • deviceName: string
      • Optional options?: RecipeFunctionOptions
      • totp: string
      • Optional userContext?: UserContext

    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