| 1234567891011121314151617181920212223 |
- import { Module } from '@nestjs/common'
- import { JwtModule } from '@nestjs/jwt'
- import { PassportModule } from '@nestjs/passport'
- import { AuthController } from './auth.controller'
- import { AuthService } from './auth.service'
- import { JwtStrategy } from './strategies/jwt.strategy'
- import { GoogleStrategy } from './strategies/google.strategy'
- import { OrgsModule } from '../orgs/orgs.module'
- @Module({
- imports: [
- PassportModule.register({ defaultStrategy: 'jwt' }),
- JwtModule.register({
- secret: process.env['JWT_SECRET'] || 'dev-secret-change-in-production',
- signOptions: { expiresIn: '15m' },
- }),
- OrgsModule,
- ],
- controllers: [AuthController],
- providers: [AuthService, JwtStrategy, GoogleStrategy],
- exports: [AuthService, JwtModule],
- })
- export class AuthModule {}
|