mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-27 10:01:54 +02:00
fix: oauth2 login can fail in some cases because the user can't be found
This commit is contained in:
@@ -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}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user