Skip to content

AuthIdentity

Defined in: packages/auth/src/types.ts:19

A resolved, trusted principal for a single request.

userId is the tenant boundary: all memory operations are scoped to it. organizationId enables org-level scoping/quotas when present.

apiKeyId: string | null

Defined in: packages/auth/src/types.ts:30

The API key id when authenticated via a key, else null. Lets rate limiting meter per-key (not just per-user) so two keys for one user have independent budgets.


email: string | null

Defined in: packages/auth/src/types.ts:22


method: AuthMethod

Defined in: packages/auth/src/types.ts:24


organizationId: string | null

Defined in: packages/auth/src/types.ts:21


scopes: string[]

Defined in: packages/auth/src/types.ts:23


userId: string

Defined in: packages/auth/src/types.ts:20