dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_AuthModule cluster_AuthModule_imports cluster_AuthModule_providers ConfirmCodeModule ConfirmCodeModule AuthModule AuthModule ConfirmCodeModule->AuthModule MailerModule MailerModule MailerModule->AuthModule OrganizationModule OrganizationModule OrganizationModule->AuthModule UserModule UserModule UserModule->AuthModule AuthService AuthService AuthService->AuthModule Jwt2faStrategy Jwt2faStrategy Jwt2faStrategy->AuthModule JwtRefreshTokenStrategy JwtRefreshTokenStrategy JwtRefreshTokenStrategy->AuthModule JwtStrategy JwtStrategy JwtStrategy->AuthModule LocalStrategy LocalStrategy LocalStrategy->AuthModule SessionSerializer SessionSerializer SessionSerializer->AuthModule
import { Module } from '@nestjs/common'
import { JwtModule } from '@nestjs/jwt'
import { PassportModule } from '@nestjs/passport'

import { UserModule } from '../user/user.module'
import { AuthController } from './auth.controller'
import { AuthService } from './auth.service'
import { SessionSerializer } from './session.serializer'
import { JwtStrategy } from './strategies/jwt.strategy'
import { LocalStrategy } from './strategies/local.strategy'
import { MailerModule } from '../mailer/mailer.module'
import { ConfirmCodeModule } from '../user/confirm-code.module'
import { OrganizationModule } from '../organization/organization.module'
import { JwtRefreshTokenStrategy } from './strategies/jwt-refresh-token.strategy'
import { Jwt2faStrategy } from './strategies/jwt-2fa.strategy'

@Module({
  imports: [
    MailerModule,
    UserModule,
    PassportModule.register({ defaultStrategy: 'jwt' }),
    JwtModule.register({
      secret: process.env.APP_SECRET,
      signOptions: {
        expiresIn: '1d',
        algorithm: 'HS384'
      },
      verifyOptions: {
        algorithms: ['HS384']
      }
    }),
    ConfirmCodeModule,
    OrganizationModule
  ],
  controllers: [AuthController],
  providers: [
    AuthService,
    LocalStrategy,
    JwtStrategy,
    SessionSerializer,
    JwtRefreshTokenStrategy,
    Jwt2faStrategy
  ]
})
export class AuthModule {}

results matching ""

    No results matching ""