Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface UserSessionManagerOptions<Device, Location>

Type parameters

  • Device: DeviceBase

  • Location

Hierarchy

  • UserSessionManagerOptions

Properties

Readonly idLength

idLength: number

Length of the generated session id.
Because base64 encoding is used underneath, this is not the string length. For example, to create a token of length 24, you want a byte length of 18.
Value of this option should not be lower than 15.

Important! To prevent brute forcing create long enough session id's.

Optional Readonly readUserSessionHook

readUserSessionHook: ReadUserSessionHook<Device, Location, UserSessionMetaData<Device, Location>>

Read user session hook.
Defaults to hook which ensures that in case device is present in both context and session metadata, their name and type needs to be equal.

Optional Readonly renewSessionHooks

renewSessionHooks: RenewSessionHooks

Hooks called on session renew.
Defaults to noop hooks.

Readonly sessionTtl

sessionTtl: number

Time To Live of the user session (in seconds).

Readonly storage

storage: UserSessionsStorage<Device, Location>

Storage where users sessions are stored.

Optional Readonly timeouts

User session lifetime timeouts.