Skip to content

IdleManager

Defined in: idleManager.ts:31

Detects if the user has been idle for a duration of idleTimeout ms, and calls onIdle and registered callbacks. By default, the IdleManager will log a user out after 10 minutes of inactivity. To override these defaults, you can pass an onIdle callback, or configure a custom idleTimeout in milliseconds

protected new IdleManager(options): IdleManager

Defined in: idleManager.ts:76

IdleManagerOptions = {}

IdleManagerOptions

IdleManager

callbacks: IdleCB[] = []

Defined in: idleManager.ts:32


idleTimeout: undefined | number

Defined in: idleManager.ts:33


optional timeoutID: number = undefined

Defined in: idleManager.ts:34

_resetTimer(): void

Defined in: idleManager.ts:138

Resets the timeouts during cleanup

void


exit(): void

Defined in: idleManager.ts:124

Cleans up the idle manager and its listeners

void


registerCallback(callback): void

Defined in: idleManager.ts:117

IdleCB

function to be called when user goes idle

void


static create(options): IdleManager

Defined in: idleManager.ts:45

Creates an IdleManager

Optional configuration

boolean

capture scroll events

Default

false

number

timeout in ms

Default

10 minutes [600_000]

() => unknown

Callback after the user has gone idle

See

IdleCB

number

scroll debounce time in ms

Default

100

IdleManager

IdleManagerOptions