SessionWithActivities
The SessionWithActivities object is a modified [Session][session-ref] object. It contains most of the information that the [Session][session-ref] object stores, adding extra information about the current session's latest activity.
The additional data included in the latest activity are useful for analytics purposes. A SessionActivity object will provide information about the user's location, device and browser.
While the SessionWithActivities object wraps the most important information around a [Session][session-ref] object, the two objects have entirely different methods.
Properties
- Name
 id- Type
 string- Description
 A unique identifier for the session.
- Name
 status- Type
 SessionStatus- Description
 The current state of the session.
- Name
 lastActiveAt- Type
 Date- Description
 The time the session was last active on the [
Client][client-ref].
- Name
 abandonAt- Type
 Date- Description
 The time when the session was abandoned by the user.
- Name
 expireAt- Type
 Date- Description
 The time the session expires and will seize to be active.
- Name
 latestActivity- Type
 SessionActivity- Description
 An object that provides additional information about this session, focused around user activity data.
function revoke(): Promise<SessionWithActivities>;Marks this session as revoked. If this is the active session, the attempt to revoke it will fail.
Users can revoke only their own sessions.
Types
SessionActivity
- Name
 id- Type
 string- Description
 A unique identifier for the session activity record.
- Name
 browserName- Type
 string | undefined- Description
 The name of the browser from which this session activity occurred.
- Name
 browserVersion- Type
 string | undefined- Description
 The version of the browser from which this session activity occurred.
- Name
 deviceType- Type
 string | undefined- Description
 The type of the device which was used in this session activity.
- Name
 ipAddress- Type
 string | undefined- Description
 The IP address from which this session activity originated.
- Name
 city- Type
 string | undefined- Description
 The city from which this session activity occurred. Resolved by IP address geo-location.
- Name
 country- Type
 string | undefined- Description
 The country from which this session activity occurred. Resolved by IP address geo-location.
- Name
 isMobile- Type
 boolean | undefined- Description
 Will be set to
trueif the session activity came from a mobile device. Set tofalseotherwise.