|
import { Module } from '@nestjs/common';
|
|
import { AuthService } from './auth.service';
|
|
import { UserModule } from '../user/user.module';
|
|
import { AuthController } from './auth.controller';
|
|
import { DatabaseModule } from '../database/database.module';
|
|
import { UserService } from '../user/user.service';
|
|
import { JwtModule } from '@nestjs/jwt';
|
|
import { PassportModule } from '@nestjs/passport';
|
|
import { jwtConstants } from 'src/constants/jwt.constant';
|
|
import { JwtStrategy } from './jwt.strategy';
|
|
import { LocalStrategy } from './local.strategy';
|
|
|
|
@Module({
|
|
imports: [
|
|
DatabaseModule,
|
|
UserModule,
|
|
PassportModule,
|
|
JwtModule.register({
|
|
secret: 'secretKey',
|
|
signOptions: { expiresIn: '60d' },
|
|
}),
|
|
],
|
|
controllers: [AuthController],
|
|
providers: [AuthService, UserService, JwtStrategy, LocalStrategy],
|
|
exports: [AuthService, UserService],
|
|
})
|
|
export class AuthModule {}
|
|
|