feat: add auth, RBAC, admin panel, and JWT-protected routes

This commit is contained in:
neon
2026-01-12 15:05:39 -06:00
parent 015028240c
commit 45f7c73ecb
109 changed files with 3813 additions and 180 deletions
+20 -1
View File
@@ -1,10 +1,29 @@
import { Module } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { CommonModule } from '../../common/common.module';
import { UserModule } from '../user/user.module';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { JwtStrategy } from './jwt.strategy';
@Module({
imports: [
PassportModule.register({ defaultStrategy: 'jwt' }),
JwtModule.registerAsync({
inject: [ConfigService],
useFactory: (config: ConfigService) => ({
secret: config.get<string>('auth.jwtSecret'),
signOptions: { expiresIn: config.get('auth.jwtExpiresIn') as any },
}),
}),
UserModule,
CommonModule,
],
controllers: [AuthController],
providers: [AuthService],
providers: [AuthService, JwtStrategy],
exports: [AuthService],
})
export class AuthModule {}