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-08-14 16:55:40 +02:00
|
|
|
import { UserService } from '@ghostfolio/api/app/user/user.service';
|
2021-04-21 20:27:39 +02:00
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration.service';
|
|
|
|
import { PrismaService } from '@ghostfolio/api/services/prisma.service';
|
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: [
|
|
|
|
JwtModule.register({
|
|
|
|
secret: process.env.JWT_SECRET_KEY,
|
|
|
|
signOptions: { expiresIn: '180 days' }
|
2021-08-22 22:11:05 +02:00
|
|
|
}),
|
|
|
|
SubscriptionModule
|
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,
|
2021-04-18 19:06:54 +02:00
|
|
|
ConfigurationService,
|
2021-04-13 21:53:58 +02:00
|
|
|
GoogleStrategy,
|
|
|
|
JwtStrategy,
|
|
|
|
PrismaService,
|
2021-06-14 16:09:40 +02:00
|
|
|
UserService,
|
|
|
|
WebAuthService
|
2021-04-13 21:53:58 +02:00
|
|
|
]
|
|
|
|
})
|
|
|
|
export class AuthModule {}
|