From ec77d13ebd39ac6d82b3c683a0a2a8d5d6a6cbc9 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sun, 10 Mar 2024 10:27:30 +0100 Subject: [PATCH] add safety check for username in github strategy --- apps/server/src/auth/strategy/github.strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/auth/strategy/github.strategy.ts b/apps/server/src/auth/strategy/github.strategy.ts index d6f6398e..b1f6ed30 100644 --- a/apps/server/src/auth/strategy/github.strategy.ts +++ b/apps/server/src/auth/strategy/github.strategy.ts @@ -31,7 +31,7 @@ export class GitHubStrategy extends PassportStrategy(Strategy, "github") { let user: User | null = null; - if (!email) throw new BadRequestException(); + if (!email || !username) throw new BadRequestException(); try { const user =