@auth/typeorm-adapter
Official TypeORM adapter for Auth.js / NextAuth.js.
Installation
npm install @auth/typeorm-adapter typeormTypeORMAdapterOptions
This is the interface for the TypeORM adapter options.
Properties
entities?
optional entities: entities;The TypeORM entities to create the database tables from.
Entities
type Entities = typeof entities;entities
const entities: entities = defaultEntities;getManager()
function getManager(options): Promise<EntityManager>Parameters
| Parameter | Type | 
|---|---|
| options | { dataSource:string|DataSourceOptions;entities:entities; } | 
| options.dataSource | string|DataSourceOptions | 
| options.entities | entities | 
Returns
Promise<EntityManager>
TypeORMAdapter()
function TypeORMAdapter(dataSource, options?): AdapterParameters
| Parameter | Type | 
|---|---|
| dataSource | string|DataSourceOptions | 
| options? | TypeORMAdapterOptions |