Skip to content

Cairn

Identity, sessions, MFA, OAuth, passkeys, and typed SDKs — embedded in your Go service.

Cairn is a shared Go auth and identity backend that SaaS products embed directly in their own service. It exposes typed Connect-RPC over a single port, persists to Postgres or SQLite, and ships typed Swift and TypeScript SDKs so your clients call it without hand-writing requests.

Get started

A new app from go mod init to a working sign-in, executed step by step. Read the walkthrough.

Data model

The entities Cairn owns — users, workspaces, sessions, files — and how to extend the model with your own. Learn the model.

Auth model

Opaque session cookies, an auth interceptor that resolves the caller’s identity, and workspace roles. See the features.

Build & deploy

One binary, real-server tests, and what production needs at boot. Read the guide.