Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Log warnings on verification token issues
Richie McIlroyfd73997d8afa
diff --git a/packages/database/auth/drizzle-adapter.ts b/packages/database/auth/drizzle-adapter.tsindex e9a4cd338..4414a48e3 100644--- a/packages/database/auth/drizzle-adapter.ts+++ b/packages/database/auth/drizzle-adapter.ts@@ -337,10 +337,22 @@ export function DrizzleAdapter(db: MySql2Database): Adapter {.where(eq(verificationTokens.token, token)).limit(1);const row = rows[0];- if (!row) return null;+ if (!row) {+ console.warn(+ "[useVerificationToken] No token found for hash",+ { identifier, tokenPrefix: token.slice(0, 8) },+ );+ return null;+ }const normalizedIdentifier = identifier?.toLowerCase() ?? "";const storedIdentifier = row.identifier?.toLowerCase() ?? "";- if (normalizedIdentifier !== storedIdentifier) return null;+ if (normalizedIdentifier !== storedIdentifier) {+ console.warn(+ "[useVerificationToken] Identifier mismatch",+ { expected: normalizedIdentifier, stored: storedIdentifier },+ );+ return null;+ }await db.delete(verificationTokens).where(