From d8a4b2f3016bc239ee8b06290994d11b95a5bc8b Mon Sep 17 00:00:00 2001 From: LeoMortari Date: Mon, 15 Sep 2025 02:04:48 -0300 Subject: [PATCH] Externaliza jwt --- src/auth/auth.module.ts | 2 +- src/auth/auth.service.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/auth/auth.module.ts b/src/auth/auth.module.ts index 358d9d1..399dda7 100644 --- a/src/auth/auth.module.ts +++ b/src/auth/auth.module.ts @@ -6,6 +6,6 @@ import { KeycloakJwtStrategy } from './keycloak.strategy'; @Module({ controllers: [AuthController], providers: [AuthService, KeycloakJwtStrategy], - exports: [AuthService], + exports: [AuthService, KeycloakJwtStrategy], }) export class AuthModule {} diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 1570441..dde50f7 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -21,9 +21,7 @@ export class AuthService { }); getUrl() { - return process.env.NODE_ENV === 'development' - ? 'https://auth.clipperia.com.br' - : 'http://keycloak:8080'; + return process.env.KEYCLOAK_URL ?? 'https://auth.clipperia.com.br'; } async login(loginDto: LoginDto) {