dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_AuthModule cluster_AuthModule_providers AwsCognitoService AwsCognitoService AuthModule AuthModule AwsCognitoService->AuthModule SignInUseCase SignInUseCase SignInUseCase->AuthModule

File

libs/auth/interface-adapters/src/lib/auth.module.ts

import { SignInUseCase } from '@auth/application';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { AwsCognitoService } from '@shared/infrastructure-aws-cognito';

import { AuthResolver } from './resolver/auth.resolver';

@Module({
  providers: [AuthResolver, SignInUseCase, AwsCognitoService],
  imports: [
    JwtModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: (configService: ConfigService) => {
        const authConfig = configService.get('auth');

        return {
          secret: authConfig.secret,
          signOptions: { expiresIn: '60s' },
        };
      },
    }),
  ],
  exports: [],
})
export class AuthModule {}

results matching ""

    No results matching ""