Skip to main content
The Stytch SDK caches the Session of the logged-in . sessions.getSync is a synchronous method that fetches the cached session object. If there is no cached data, this method will return null.

Response

string
Globally unique UUID that identifies the Session.
string
Globally unique UUID that identifies a specific Member.
array[objects]
An array of authentication factors that comprise a Session.
The globally unique UUID that identifies the Organization associated with the Session.
The unique URL slug of the Organization associated with the Session.
array[string]
A list of the roles associated with the Session. Members may inherit certain roles depending on the factors in their Session. For example, some roles may only be active if the member logged in from a specific SAML IDP.
string
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.
string
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.
string
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.
map<string, any>
The custom claims map for a Session. Claims can be added to a Session during a Sessions authenticate call.