From 0002cc734ef9713c6daba5241cac9adb93193468 Mon Sep 17 00:00:00 2001 From: En Rong <53928333+chownces@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:25:15 +0800 Subject: [PATCH] fix(backend-auth): fix environment variable typo --- backend/apps/auth/src/auth.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/apps/auth/src/auth.service.ts b/backend/apps/auth/src/auth.service.ts index 80b24319..8b1619fd 100644 --- a/backend/apps/auth/src/auth.service.ts +++ b/backend/apps/auth/src/auth.service.ts @@ -36,7 +36,7 @@ export class AuthService { private verifyRefreshToken(refreshToken: string): JwtPayload { try { return this.jwtService.verify(refreshToken, { - secret: this.tokenConfig.accessTokenSecret, + secret: this.tokenConfig.refreshTokenSecret, }); } catch (e) { throw new HttpException('Invalid refresh token', 401); @@ -77,7 +77,6 @@ export class AuthService { ); if (!isValidRefreshToken) { - // TODO: How to 401 in upstream gateway microservice? throw new HttpException('Invalid refresh token', 401); }