Hierarchy

  • SessionHandlerParams
    • SessionHandler

Constructors

  • Parameters

    • params: SessionHandlerParams = {}

    Returns SessionHandler

Properties

onSessionClosed?: (() => void) = noop

Called when the session is explicitly closed on refresh.

onSessionError?: ((err: Error) => void) = noop

Called when the SDK runs into an error while refreshing the session key.

onSessionExpired?: (() => void) = noop

since v4.0.7

onSessionRefreshed?: (() => void) = noop

Called after SDK successfully refreshes the session key.

onSessionTokenRequired?: ((resolve: SessionTokenRefreshResolve, reject: SessionTokenRefreshReject) => void) = ...

Needs to fetch a new token and pass the new token to the SDK via resolve(), or reject() if error has occurred during the fetch.