account.listSessions
import { Client, Orvano } from '@orvano/js'
const orvano = new Orvano(new Client({ endpoint: 'https://orvano.example.com' }))
const sessionPage = await orvano.account.listSessions()console.log(sessionPage)// app/page.tsx, a server component. Route handlers and server actions use createServerClient too.import { cookies } from 'next/headers'import { createServerClient } from '@orvano/nextjs'
export default async function Page() { const orvano = createServerClient({ endpoint: process.env.ORVANO_ENDPOINT!, cookies: await cookies(), }) const sessionPage = await orvano.account.listSessions() return <pre>{JSON.stringify(sessionPage, null, 2)}</pre>}import 'package:orvano_flutter/orvano_flutter.dart';
Future<void> main() async { final orvano = Orvano(Client(endpoint: 'https://orvano.example.com')); final sessionPage = await orvano.account.listSessions(); print(sessionPage.toJson());}Lists the signed in user’s active sessions, newest first.
Client SDKs: JavaScript in the browser, Next.js, and Flutter call it for the signed in user, or with no credential. A failure answers with a problem details body; its code has a page under Errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The nextCursor of the previous page.
Sessions per page, 1 to 100. Defaults to 25.
Responses
Section titled “Responses”The request has succeeded.
One page of a user’s active sessions, newest first.
object
The sessions on this page.
An active session of a user: one signed in device or browser.
object
The session ID.
When the user signed in.
When the session last traded its refresh token.
Whether this is the session making the call.
How the session began.
Example
{ "items": [ { "id": "01924f5e-9a1b-7c4d-8e21-3d5e6f7a8b9c", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "sdk": "orvano-js/0.1.0", "ipAddress": "203.0.113.7", "current": true, "method": "password" } ]}default
Section titled “default”An unexpected error response.
An RFC 9457 problem details body. Every operation declares it as its default response, sent
as application/problem+json.
object
Identifies the error: https://orvano.dev/errors/<code>.
The standard HTTP reason phrase for the status.
The HTTP status code.
A short, safe sentence about this occurrence, when the server has one.
Orvano’s stable error code, from the ErrorCode catalog. SDKs treat it as a plain string.
The request ID to quote when reporting a problem; also sent as X-Request-Id.
Example
{ "type": "https://orvano.dev/errors/not_found", "title": "Not Found", "status": 404, "code": "not_found", "requestId": "4bf92f3577b34da6a3ce929d0e0e4736"}