mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-16 17:51:43 +10:00
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();
|
if (!email) throw new BadRequestException();
|
||||||
|
|
||||||
try {
|
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();
|
if (!user) throw new UnauthorizedException();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user