Merge pull request #1799 from mradigen/main

fix(github_auth): fix GithubStrategy not searching for user using username
This commit is contained in:
Amruth Pillai
2024-03-10 10:25:28 +01:00
committed by GitHub

View File

@ -34,7 +34,9 @@ export class GitHubStrategy extends PassportStrategy(Strategy, "github") {
if (!email) throw new BadRequestException();
try {
const user = await this.userService.findOneByIdentifier(email);
const user =
(await this.userService.findOneByIdentifier(email)) ||
(await this.userService.findOneByIdentifier(username));
if (!user) throw new UnauthorizedException();