コンテンツにスキップ
NextAuth.js v4 からの移行ですか? こちらをお読みください 移行ガイド.
API リファレンス@auth/typeorm-adapter

@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

パラメーター

パラメーター
dataSourcestring | DataSourceOptions
options?TypeORMAdapterOptions

戻り値

アダプター


getManager()

getManager(options): Promise<EntityManager>

パラメーター

パラメーター
optionsオブジェクト
options.dataSourcestring | DataSourceOptions
options.entitiesエンティティ

戻り値

Promise<EntityManager>

Auth.js © Balázs Orbán and Team -2024