Cambios el charly
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
@Injectable()
|
||||
export class JwtAuthGuard extends AuthGuard('jwt'){}
|
||||
|
||||
@@ -3,13 +3,12 @@ import { AuthController } from './auth.controller';
|
||||
import { AuthService } from './auth.service';
|
||||
import { UsuariosModule } from 'src/usuarios/usuarios.module';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import { PassportModule } from '@nestjs/passport';
|
||||
import { JwtStrategy } from './jwt.strategy';
|
||||
|
||||
|
||||
|
||||
@Module({
|
||||
imports:[UsuariosModule,
|
||||
JwtModule,
|
||||
PassportModule,
|
||||
JwtModule.register({
|
||||
global:true,
|
||||
secret: process.env.JWT,
|
||||
@@ -18,6 +17,6 @@ import { JwtStrategy } from './jwt.strategy';
|
||||
}),
|
||||
],
|
||||
controllers: [AuthController],
|
||||
providers: [AuthService,JwtStrategy]
|
||||
providers: [AuthService]
|
||||
})
|
||||
export class AuthModule {}
|
||||
|
||||
Reference in New Issue
Block a user