dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_AuthModule cluster_AuthModule_exports cluster_AuthModule_providers JwtStrategy JwtStrategy AuthModule AuthModule AuthModule->JwtStrategy AuthService AuthService AuthService->AuthModule JwtStrategy JwtStrategy JwtStrategy->AuthModule

File

src/auth/auth.module.ts

Controllers

Exports

import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserRepository } from './user.repository';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { JwtStrategy } from './jwt.strategy';

@Module({
  imports: [
    PassportModule.register({ defaultStrategy: 'jwt' }),
    JwtModule.register({
      secret: 'topsecret51',
      signOptions: {
        expiresIn: 3600,
      },
    }),
    TypeOrmModule.forFeature([UserRepository]),
  ],
  providers: [AuthService, JwtStrategy],
  controllers: [AuthController],
  exports: [JwtStrategy, PassportModule],
})
export class AuthModule {}

result-matching ""

    No results matching ""