nestjs-auth-kit
Version:
A modular and flexible authentication kit for NestJS with JWT, social login, OTP, and password reset.
27 lines (19 loc) • 496 B
text/typescript
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
import { OtpEntity } from './otp.entity';
()
export class User {
()
id?: string;
()
firstName?: string;
()
lastName?: string;
()
email?: string;
()
password?: string;
('simple-array', { nullable: true })
roles?: string[];
(() => OtpEntity, (otp) => otp.user)
otps?: OtpEntity[];
}