Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Introduction

The @frame/auth package is the heart of identity control within the FRAME monorepo. Its primary purpose is to centralize and standardize how users sign in, maintain sessions, and authenticate securely across multiple interfaces.

Unlike authentication models coupled to a single application, @frame/auth is designed as an independent layer.

  • Single Source of Truth: Session rules, token strategies, and schemas are defined here and imported by both the client (Next.js) and the backend (NestJS).
  • Cross-Platform Focus: It exports both server-side configurations and standard auth clients.

The package builds its capabilities on the Better Auth engine, enriched with tools from the FRAME ecosystem.

  • Better Auth: Primary authentication framework, chosen for its portability, native performance, and TypeScript extensibility.
DependencyRole
@frame/modelsDefines and injects the underlying database that stores profiles, sessions, and account tokens.
apps/nextConsumes the authentication client (authClient) to hydrate components and protect routes reactively.
apps/nestWraps the Better Auth server instance to inject authorization flows through custom decorators.

Continue to Logical Architecture to understand dynamic plugin wiring.