2021-06-14 16:09:40 +02:00
|
|
|
import { AuthDeviceService } from '@ghostfolio/api/app/auth-device/auth-device.service';
|
|
|
|
import { WebAuthService } from '@ghostfolio/api/app/auth/web-auth.service';
|
2021-08-22 22:11:05 +02:00
|
|
|
import { SubscriptionModule } from '@ghostfolio/api/app/subscription/subscription.module';
|
2021-12-07 20:24:15 +01:00
|
|
|
import { UserModule } from '@ghostfolio/api/app/user/user.module';
|
2022-02-18 19:32:25 +01:00
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module';
|
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma.module';
|
2021-04-13 21:53:58 +02:00
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
import { JwtModule } from '@nestjs/jwt';
|
|
|
|
|
|
|
|
import { AuthController } from './auth.controller';
|
|
|
|
import { AuthService } from './auth.service';
|
|
|
|
import { GoogleStrategy } from './google.strategy';
|
|
|
|
import { JwtStrategy } from './jwt.strategy';
|
|
|
|
|
|
|
|
@Module({
|
|
|
|
controllers: [AuthController],
|
|
|
|
imports: [
|
2022-02-18 19:32:25 +01:00
|
|
|
ConfigurationModule,
|
2021-04-13 21:53:58 +02:00
|
|
|
JwtModule.register({
|
|
|
|
secret: process.env.JWT_SECRET_KEY,
|
|
|
|
signOptions: { expiresIn: '180 days' }
|
2021-08-22 22:11:05 +02:00
|
|
|
}),
|
2022-02-18 19:32:25 +01:00
|
|
|
PrismaModule,
|
2021-12-07 20:24:15 +01:00
|
|
|
SubscriptionModule,
|
|
|
|
UserModule
|
2021-04-13 21:53:58 +02:00
|
|
|
],
|
|
|
|
providers: [
|
2021-06-14 16:09:40 +02:00
|
|
|
AuthDeviceService,
|
2021-04-13 21:53:58 +02:00
|
|
|
AuthService,
|
|
|
|
GoogleStrategy,
|
|
|
|
JwtStrategy,
|
2021-06-14 16:09:40 +02:00
|
|
|
WebAuthService
|
2021-04-13 21:53:58 +02:00
|
|
|
]
|
|
|
|
})
|
|
|
|
export class AuthModule {}
|