added two factor to login endpoint

This commit is contained in:
Milo Schwartz
2024-10-02 20:19:48 -04:00
parent d7e090e5b7
commit d1e198fe55
5 changed files with 308 additions and 6 deletions

View File

@@ -71,6 +71,10 @@ export const users = sqliteTable("user", {
id: text("id").primaryKey(), // has to be id not userId for lucia
email: text("email").notNull().unique(),
passwordHash: text("passwordHash").notNull(),
twoFactorEnabled: integer("twoFactorEnabled", { mode: "boolean" })
.notNull()
.default(false),
twoFactorSecret: text("twoFactorSecret"),
});
// Sessions table