@companyio/auth-client
v0.1.32
Published
Platform-neutral authentication and user-management client
Readme
@companyio/auth-client
Platform-neutral client for password sign-in, signup, session restoration, logout, current-user requests, and organization lookup.
Setup
import { AuthClient, createBrowserStorage } from '@companyio/auth-client';
const authClient = new AuthClient({
baseUrl: import.meta.env.VITE_API_URL ?? 'http://localhost:3000',
clientId: 'my-app',
storage: createBrowserStorage(),
});Use createMemoryStorage() for tests or short-lived sessions. The client expects the API under /api/v1 and sends bearer tokens automatically.
Build
pnpm --filter @companyio/auth-client build