Skip to main content

getSession()

getSession(): Promise<Session>

Defined in: packages/core/src/index.ts:227

Get current session information including user details and token expiry

Returns

Promise<Session>

Session object with user info and token metadata

Throws

401 - Not authenticated

Example

import { getSession } from "@cpod/sdk";

const session = await getSession();
console.log(session.user.email);