diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 63f6089..e311238 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -16,6 +16,9 @@ export class AuthService { async validateUser(email: string, displayName: string) { const user = await this.userRepo.findOne({ where: { email: email } }); + if (!user?.isEnabled) { + return null; + } if (user) { return user; @@ -34,6 +37,9 @@ export class AuthService { async findUser(id: string) { const user = await this.userRepo.findOne({ where: { id } }); + if (!user?.isEnabled) { + return null; + } return user?.id || null; } }