@angelitosystems/nest-auth-typeorm
v1.0.0
Published
TypeORM database adapter for @angelitosystems/nest-auth (PostgreSQL & MySQL) by Angelito Systems
Maintainers
Readme
@angelitosystems/nest-auth-typeorm
Official TypeORM database persistence adapter for @angelitosystems/nest-auth (PostgreSQL & MySQL).
⚡ Installation
npm install @angelitosystems/nest-auth @angelitosystems/nest-auth-typeorm typeorm🚀 Usage
import { Module } from '@nestjs/common';
import { DataSource } from 'typeorm';
import { AuthModule } from '@angelitosystems/nest-auth';
import { TypeOrmAuthAdapter, AUTH_ENTITIES } from '@angelitosystems/nest-auth-typeorm';
// In your TypeORM configuration, register AUTH_ENTITIES
// Then inject or instantiate DataSource:
const adapter = new TypeOrmAuthAdapter(dataSource);
@Module({
imports: [
AuthModule.forRoot({
adapter,
jwt: {
secret: process.env.AUTH_JWT_SECRET!,
},
}),
],
})
export class AppModule {}📄 License
MIT © Angelito Systems
