mirror of
https://github.com/hknsh/project-knedita.git
synced 2024-11-29 01:41:16 +00:00
22 lines
708 B
TypeScript
22 lines
708 B
TypeScript
import { Module } from "@nestjs/common";
|
|
import { AuthService } from "./auth.service";
|
|
import { PassportModule } from "@nestjs/passport";
|
|
import { LocalStrategy } from "./local.strategy";
|
|
import { UserModule } from "src/user/user.module";
|
|
import { AuthController } from "./auth.controller";
|
|
import { JwtModule } from "@nestjs/jwt";
|
|
import { JwtStrategy } from "./jwt.strategy";
|
|
|
|
@Module({
|
|
controllers: [AuthController],
|
|
imports: [
|
|
UserModule,
|
|
PassportModule,
|
|
JwtModule.register({
|
|
secret: process.env.JWT_ACCESS_SECRET,
|
|
signOptions: { expiresIn: "1d" }, // TODO: add refresh tokens
|
|
}),
|
|
],
|
|
providers: [AuthService, LocalStrategy, JwtStrategy],
|
|
})
|
|
export class AuthModule {}
|