@auth/typeorm-adapter
Auth.js / NextAuth.js 用の公式 TypeORM アダプター。
インストール
npm install @auth/typeorm-adapter typeorm
TypeORMAdapterOptions
これは TypeORM アダプターオプションのインターフェースです。
プロパティ
entities?
optional entities: entities;
データベーステーブルを作成するための TypeORM エンティティ。
エンティティ
type Entities: typeof entities;
entities
const entities: entities = defaultEntities;
TypeORMAdapter()
TypeORMAdapter(dataSource, options?): Adapter
パラメーター
パラメーター | 型 |
---|---|
dataSource | string | DataSourceOptions |
options ? | TypeORMAdapterOptions |
戻り値
getManager()
getManager(options): Promise<EntityManager>
パラメーター
パラメーター | 型 |
---|---|
options | オブジェクト |
options.dataSource | string | DataSourceOptions |
options.entities | エンティティ |
戻り値
Promise
<EntityManager
>