mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
Merge pull request #1799 from mradigen/main
fix(github_auth): fix GithubStrategy not searching for user using username
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user