Better Auth · Hook
useSession
Better Auth uses cookies to manage sessions. Its client API can read, observe, list, update, and revoke sessions, while optional signed cookie caching reduces repeated database reads.
Last updated
Syntax
authClient.getSession(); authClient.useSession(); authClient.listSessions(); authClient.revokeSession({ token }); authClient.revokeOtherSessions(); authClient.revokeSessions(); authClient.updateSession(fields);In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getSessionuseSessionlistSessionsrevokeSessionrevokeOtherSessionsrevokeSessionsupdateSessioncookieCache