session.getSync is a synchronous method that fetches the cached Session object.
If there is no cached data, this method returns null.
The session.getInfo method is similar to session.getSync, but returns an object containing the session object and a fromCache boolean. If fromCache is true, the session object is from the cache and a state refresh is in progress.
You can listen for changes with the session.onChange method, which invokes your callback whenever the Session object changes.
Response
A unique identifier for a specific Session.
The unique ID of the affected User.
An array of different authentication factors that comprise a Session.
The timestamp when the Session was created. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.
The timestamp when the Session was last accessed. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.
The timestamp when the Session expires. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.
Provided attributes help with fraud detection.
The custom claims map for a Session. Claims can be added to a session during a Sessions authenticate call.
A list of the roles associated with the session.