Skip to content

Commit

Permalink
Add info about how to access SessionWithActivities object (#1543)
Browse files Browse the repository at this point in the history
Co-authored-by: victoria <[email protected]>
  • Loading branch information
2 people authored and royanger committed Oct 8, 2024
1 parent 57d1519 commit d755146
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docs/references/javascript/session-with-activities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: '`SessionWithActivities`'
description: The SessionWithActivities object is a modified Session object. It contains most of the information that the Session object stores, adding extra information about the current session's latest activity.
---

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 `SessionWithActivities` object is a modified [`Session`](/docs/references/javascript/session) object. It includes most of the information stored in the `Session` object, with additional details about the latest activity in the current session. `SessionWithActivities` is returned by the [`User.getSessions()`](/docs/references/javascript/user/user#get-sessions) method.

The additional data included in the latest activity are useful for analytics purposes. A [`SessionActivity`](#session-activity) object will provide information about the user's location, device and browser.
The additional data included in the latest activity is useful for analytics purposes. A [`SessionActivity`](#session-activity) object provides 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.
While the `SessionWithActivities` object wraps the most important information around a `Session` object, the two objects have entirely different methods.

## Properties

Expand All @@ -29,7 +29,7 @@ While the `SessionWithActivities` object wraps the most important information ar
- `lastActiveAt`
- `Date`

The time the session was last active on the [`Client`][client-ref].
The time the session was last active on the [`Client`](/docs/references/javascript/client).

---

Expand Down Expand Up @@ -124,7 +124,3 @@ function revoke(): Promise<SessionWithActivities>

Will be set to `true` if the session activity came from a mobile device. Set to `false` otherwise.
</Properties>

[client-ref]: /docs/references/javascript/client

[session-ref]: /docs/references/javascript/session

0 comments on commit d755146

Please sign in to comment.