Spaces:
Sleeping
Sleeping
Download src/modules/auth/auth.module.ts from mahrooshishaq/SmartfolioBackend: direct link, hf CLI and curl.
- Browser
- Download file 1.28 kB
-
https://huggingface.co/spaces/mahrooshishaq/SmartfolioBackend/resolve/main/src/modules/auth/auth.module.ts
- Command line
-
hf download hf://spaces/mahrooshishaq/SmartfolioBackend/src/modules/auth/auth.module.ts
-
curl -L -o auth.module.ts https://huggingface.co/spaces/mahrooshishaq/SmartfolioBackend/resolve/main/src/modules/auth/auth.module.ts
1.28 kB
| import { Module } from '@nestjs/common'; | |
| import { AuthService } from './auth.service'; | |
| import { AuthController } from './auth.controller'; | |
| import { UsersModule } from '../users/users.module'; | |
| import { JwtModule } from '@nestjs/jwt'; | |
| import { ConfigModule, ConfigService } from '@nestjs/config'; | |
| import { PassportModule } from '@nestjs/passport'; | |
| import { JwtStrategy } from './jwt.strategy'; | |
| import { MailModule } from '../mail/mail.model' | |
| import { GoogleStrategy } from './strategies/google.strategy'; | |
| import { ScraperModule } from '../scraper/scraper.module'; | |
| ({ | |
| imports: [ | |
| UsersModule, | |
| PassportModule, | |
| ConfigModule, | |
| MailModule, | |
| // Login refreshes a stale feed on the way in (see ScraperService.ensureFreshFeed). | |
| ScraperModule, | |
| JwtModule.registerAsync({ | |
| imports: [ConfigModule], | |
| inject: [ConfigService], | |
| useFactory: (config: ConfigService) => ({ | |
| secret: config.get<string>('JWT_ACCESS_SECRET'), // Access token secret | |
| signOptions: { | |
| expiresIn: config.get<number>('JWT_ACCESS_TTL') || 3600, | |
| }, | |
| }), | |
| }), | |
| ], | |
| controllers: [AuthController], | |
| providers: [AuthService, JwtStrategy, GoogleStrategy], // ⬅️ Add JwtStrategy here | |
| exports: [AuthService], | |
| }) | |
| export class AuthModule {} | |