Skip to content

Commit

Permalink
Add temporary logging to rememberDevice for troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
paustint committed Nov 9, 2024
1 parent 184915a commit a706c4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/auth/server/src/lib/auth.db.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ export async function hasRememberDeviceRecord({
userAgent?: Maybe<string>;
}) {
try {
console.log('TEMP REMOVE ME: hasRememberDeviceRecord: userId', userId);
console.log('TEMP REMOVE ME: hasRememberDeviceRecord: deviceId', deviceId);
console.log('TEMP REMOVE ME: hasRememberDeviceRecord: ipAddress', ipAddress);
console.log('TEMP REMOVE ME: hasRememberDeviceRecord: userAgent', userAgent);

const matchingRecords = await prisma.rememberedDevice.count({
where: {
userId,
Expand All @@ -145,6 +150,7 @@ export async function hasRememberDeviceRecord({
expiresAt: { gte: new Date() },
},
});
console.log('TEMP REMOVE ME: matchingRecords:', matchingRecords);
return matchingRecords > 0;
} catch (ex) {
logger.error({ ...getErrorMessageAndStackObj(ex) }, 'Error checking for remember device record');
Expand Down

0 comments on commit a706c4c

Please sign in to comment.