@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;TypeORMAdapter()
TypeORMAdapter(dataSource, options?): AdapterParameters
| Parameter | Type | 
|---|---|
| dataSource | string|DataSourceOptions | 
| options? | TypeORMAdapterOptions | 
Returns
getManager()
getManager(options): Promise<EntityManager>Parameters
| Parameter | Type | 
|---|---|
| options | Object | 
| options.dataSource | string|DataSourceOptions | 
| options.entities | entities | 
Returns
Promise<EntityManager>