feat: ✨ 前端:玩家服务平台和运营管理系统后台初始化及框架搭建,后端:完成基础功能搭建。
This commit is contained in:
22
backend/src/auth/auth.module.ts
Normal file
22
backend/src/auth/auth.module.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { PassportModule } from '@nestjs/passport';
|
||||
import { AuthService } from './auth.service';
|
||||
import { AuthController } from './auth.controller';
|
||||
import { AdminUser } from '../entities/admin-user.entity';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([AdminUser]),
|
||||
PassportModule,
|
||||
JwtModule.register({
|
||||
secret: process.env.JWT_SECRET || 'your_jwt_secret_key_change_in_production',
|
||||
signOptions: { expiresIn: process.env.JWT_EXPIRES_IN || '24h' } as any,
|
||||
}),
|
||||
],
|
||||
controllers: [AuthController],
|
||||
providers: [AuthService],
|
||||
exports: [AuthService],
|
||||
})
|
||||
export class AuthModule {}
|
||||
Reference in New Issue
Block a user