added two factor to login endpoint

This commit is contained in:
Milo Schwartz 2024-10-02 20:19:48 -04:00
parent 023ec86107
commit 905cfaea34
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