aitasker / backend /src /auth /auth.module.ts
minhhungg's picture
feat: upload dataset and simulation files to Hugging Face
675f6bd
Raw
History Blame Contribute Delete
791 Bytes
import { Module } from '@nestjs/common';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { PrismaService } from 'prisma/prisma.service';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { JwtStrategy } from './strategies/jwt.strategy';
@Module({
controllers: [AuthController],
providers: [AuthService, PrismaService, JwtStrategy],
// Export section
exports: [JwtStrategy, PassportModule, AuthService],
// Import section
imports: [
PassportModule.register({ defaultStrategy: 'jwt' }),
JwtModule.register({
global: true,
secret: process.env.JWT_SECRET,
signOptions: {
expiresIn: '7d',
},
}),
],
})
export class AuthModule {}