mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-15 01:14:27 -05:00
fix: oauth2 login can fail in some cases because the user can't be found
This commit is contained in:
parent
0670aaa331
commit
92e1e82e09
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ export class OAuthService {
|
||||||
await this.updateIsAdmin(user);
|
await this.updateIsAdmin(user);
|
||||||
const updatedUser = await this.prisma.user.findFirst({
|
const updatedUser = await this.prisma.user.findFirst({
|
||||||
where: {
|
where: {
|
||||||
email: user.email,
|
id: oauthUser.userId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.logger.log(`Successful login for user ${user.email} from IP ${ip}`);
|
this.logger.log(`Successful login for user ${user.email} from IP ${ip}`);
|
||||||
|
|
Loading…
Add table
Reference in a new issue