Skip to content

Commit

Permalink
add safety check for username in github strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Mar 10, 2024
1 parent c8f7989 commit ec77d13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/server/src/auth/strategy/github.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit ec77d13

Please sign in to comment.