Skip to main content

authentication

Sessions, sign-in/sign-up flows, OAuth, magic links, or organization context on the session.

Source facts

Repository
latitude-dev/latitude-llm
Last source activity
March 31, 2026 at 12:27
Detected SKILL.md language
English
Stars
4,722
Forks
402

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
authentication
description
Sessions, sign-in/sign-up flows, OAuth, magic links, or organization context on the session.
# Authentication (Better Auth) **When to use:** Sessions, sign-in/sign-up flows, OAuth, magic links, or organization context on the session. ## Stack - **`@platform/db-postgres`** exposes **`createBetterAuth()`** in `packages/platform/db-postgres/src/create-better-auth.ts`, wiring **better-auth** with the Drizzle adapter against the shared Postgres client. - Sessions: `auth.api.getSession({ headers })` → `{ user, session }` with typed fields. - **`User`** includes `id`, `email`, `name` — use those fields directly (no assertions). ## Web app helpers - Session helpers: `apps/web/src/domains/sessions/session.functions.ts` (`getSession`, `ensureSession`, etc.). - **Organization context** is added via the **`customSession`** plugin (multi-tenant product behavior). ## Domain alignment - Auth **intent** flows (login/signup completion) use use-cases from **`@domain/auth`** composed with Postgres repositories — keep policy in domain, wiring in apps. For HTTP boundary rules (who may call what), see [architecture-boundaries](../architecture-boundaries/SKILL.md).
View on GitHub