Skip to content

VexSessionAdapter

Defined in: packages/react/src/auth/VexSessionAdapterContext.tsx:29

App-provided bridge from the host app’s own auth client to useCanAccessAdminPanel, for a public page outside /admin.

VexSessionAdapterProvider

useSession: () => VexSessionState

Defined in: packages/react/src/auth/VexSessionAdapterContext.tsx:39

Reactive client session hook — called unconditionally by useCanAccessAdminPanel, like FrameworkComponents.useNavigate/ useIsRouteCovered. Next.js + Better Auth: wrap authClient.useSession(), mapping its { data, isPending } to { user: data?.user ?? null, organization: data?.activeOrganization, isPending }.

VexSessionState

The current caller plus whether the session is still resolving.