getActiveSessionsByMarker
Get the user's active sessions. 🔐 This method requires authorization.
Description
Fetches the authenticated user's active sessions for an auth provider. Resolves to an array of IActiveSession objects, one per session, each with its deviceInfo.
.getActiveSessionsByMarker(
);
Parameters schema
Schema
marker(required): string
Marker of the auth provider.
example: "email"
Examples
Minimal example
const response = await AuthProvider.getActiveSessionsByMarker('email');
Example response
[
{
"deviceInfo": {
"os": "Node.js",
"browser": "Node.js/c6f42ef6-0",
"location": "en-US"
}
},
{
"deviceInfo": {
"os": "Node.js",
"browser": "Node.js/54bbc8da-e",
"location": "en-US"
}
},
{
"deviceInfo": {
"os": "Node.js",
"browser": "Node.js/276091fb-6",
"location": "en-US"
}
}
]
Response schema
Schema: IActiveSession[]
deviceInfo: object
Device used in the active session.
example:
{
"os": "Win32",
"browser": "Node.js/22",
"location": "en-US"
}
deviceInfo.os: string
Operating system of the active session.
example: "Win32"
deviceInfo.browser: string
Browser of the active session.
example: "Node.js/22"
deviceInfo.location: string
Location of the active session.
example: "en-US"