@omgjs/labkit-server-auth-typeorm
v0.1.1
Published
TypeORM persistence adapter for Labkit server auth users, accounts, roles, and refresh sessions.
Readme
@omgjs/labkit-server-auth-typeorm
@omgjs/labkit-server-auth-typeorm is the optional TypeORM/PostgreSQL persistence
adapter boundary for @omgjs/labkit-server-auth.
Owns
- Default Labkit auth TypeORM entities.
- The checked-in identity-table migration.
- Repository adapters for
@omgjs/labkit-server-authstorage interfaces. - A transaction runner adapter.
- Nest provider factories for those adapters.
ServerAuthTypeormModulefor standard Nest provider registration.serverAuthTypeormDatabaseManifestfor app-owned TypeORM option composition.
Does Not Own
- Running migrations.
- Enabling schema synchronization.
- Creating or mutating database schema at import time.
- Password hashing.
- JWT signing.
- GraphQL DTOs or resolver behavior.
Usage
import { ServerAuthTypeormModule } from "@omgjs/labkit-server-auth-typeorm";
@Module({
imports: [ServerAuthTypeormModule],
})
export class IdentityModule {}Compose the database manifest into the app-owned TypeORM configuration:
import { composeServerDatabaseManifests } from "@omgjs/labkit-server-database";
import { serverAuthTypeormDatabaseManifest } from "@omgjs/labkit-server-auth-typeorm";
const manifest = composeServerDatabaseManifests([
serverAuthTypeormDatabaseManifest,
appFeatureDatabaseManifest,
]);Server apps opt into auth persistence by composing this package's database manifest and running migrations through their own database workflow.
Boundary
Importing this package must not run migrations, enable schema synchronization, or mutate a database. The application owns migration execution and deployment timing.
Release Channel
This package is published on npm as part of the Labkit release train. Patch releases may include documentation-only clarifications, so consumers can update within the same minor line without expecting runtime API changes.
Package Format
This is a server-only CommonJS package.
