From 89e071e1dfe965bd0e59554be8dd1d0ea99bf17b Mon Sep 17 00:00:00 2001 From: leemhoon00 Date: Tue, 16 Dec 2025 16:43:58 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B2=A4=20=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/constants/ban-list.constant.ts | 3 +++ src/module/auth/auth.service.ts | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/common/constants/ban-list.constant.ts diff --git a/src/common/constants/ban-list.constant.ts b/src/common/constants/ban-list.constant.ts new file mode 100644 index 0000000..c007b9d --- /dev/null +++ b/src/common/constants/ban-list.constant.ts @@ -0,0 +1,3 @@ +export const googleBanList = ['111415759746016734843']; + +export const kakaoBanList = ['4631544690', '4643411471']; diff --git a/src/module/auth/auth.service.ts b/src/module/auth/auth.service.ts index 7821037..ccb318e 100644 --- a/src/module/auth/auth.service.ts +++ b/src/module/auth/auth.service.ts @@ -4,6 +4,10 @@ import { UserReader } from '../user/repository/user.reader'; import { JwtService } from '@nestjs/jwt'; import { ConfigService } from '@nestjs/config'; import type { ClientInfo } from 'src/shared/types/client-info'; +import { + googleBanList, + kakaoBanList, +} from 'src/common/constants/ban-list.constant'; @Injectable() export class AuthService { @@ -75,9 +79,9 @@ export class AuthService { const googleProfile = await this.getGoogleProfile( input.providerAccessToken, ); - if (googleProfile.id === '111415759746016734843') { - throw Error('모모임'); - } + if (googleBanList.includes(googleProfile.id)) + throw new Error(`벤이다 이녀석아 ${googleProfile.id}`); + providerId = googleProfile.id; email = googleProfile.email; } else if (input.provider === 'APPLE') { @@ -90,6 +94,9 @@ export class AuthService { const kakaoProfile = await this.getKakaoProfile( input.providerAccessToken, ); + if (kakaoBanList.includes(kakaoProfile.kakaoId)) + throw new Error(`벤이다 이녀석아 ${kakaoProfile.kakaoId}`); + providerId = kakaoProfile.kakaoId; email = kakaoProfile.email; }