Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/common/constants/ban-list.constant.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const googleBanList = ['111415759746016734843'];

export const kakaoBanList = ['4631544690', '4643411471'];
13 changes: 10 additions & 3 deletions src/module/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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') {
Expand All @@ -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;
}
Expand Down
Loading