Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Add epochTolerance & logs

Blue Mouse68dfa322ac90
diff --git a/backend/apps/cloud/src/twoFactorAuth/twoFactorAuth.service.ts b/backend/apps/cloud/src/twoFactorAuth/twoFactorAuth.service.ts
index d7f773e09..98a4d1c05 100644
--- a/backend/apps/cloud/src/twoFactorAuth/twoFactorAuth.service.ts
+++ b/backend/apps/cloud/src/twoFactorAuth/twoFactorAuth.service.ts
@@ -38,10 +38,12 @@ export class TwoFactorAuthService {
const result = await verify({
token: twoFactorAuthenticationCode,
secret: user.twoFactorAuthenticationSecret,
+ epochTolerance: 30,
})
return result.valid
- } catch {
+ } catch (error) {
+ console.error('[TwoFactorAuthService] TOTP verification error:', error)
return false
}
}
diff --git a/backend/apps/community/src/twoFactorAuth/twoFactorAuth.service.ts b/backend/apps/community/src/twoFactorAuth/twoFactorAuth.service.ts
index 626e90df5..fda5400c2 100644
--- a/backend/apps/community/src/twoFactorAuth/twoFactorAuth.service.ts
+++ b/backend/apps/community/src/twoFactorAuth/twoFactorAuth.service.ts
@@ -51,10 +51,12 @@ export class TwoFactorAuthService {
const result = await verify({
token: twoFactorAuthenticationCode,
secret: user.twoFactorAuthenticationSecret,
+ epochTolerance: 30,
})
return result.valid
- } catch {
+ } catch (error) {
+ console.error('[TwoFactorAuthService] TOTP verification error:', error)
return false
}
}