fix: add missing two_factor.verified column required by plugin
The two-factor plugin reads/writes a verified boolean on the twoFactor model (set true by verify-totp); without it the drizzle adapter rejects every /two-factor/enable call.
This commit is contained in:
1 parent
0d939593c8
commit
f42f4d5d2d
4 files changed
+1952
No files matched your search
@@ -0,0 +1 @@
|
||||
ALTER TABLE "two_factor" ADD COLUMN "verified" boolean DEFAULT false NOT NULL;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -78,6 +78,13 @@
|
||||
"when": 1787617368189,
|
||||
"tag": "0010_two-factor",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 11,
|
||||
"version": "7",
|
||||
"when": 1787620365940,
|
||||
"tag": "0011_two-factor-verified",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -27,6 +27,9 @@ export const twoFactors = pgTable("two_factor", {
|
||||
.references(() => users.id, { onDelete: "restrict" }),
|
||||
secret: text("secret").notNull(),
|
||||
backupCodes: text("backup_codes"),
|
||||
// Set by Better Auth's verify-totp step; enable returns verified=false until
|
||||
// the first valid TOTP code confirms possession of the authenticator.
|
||||
verified: boolean("verified").notNull().default(false),
|
||||
});
|
||||
|
||||
export const accounts = pgTable("account", {
|
||||
|
||||
Reference in new issue
Block a user