mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-01 08:34:53 +02:00
added reset password workflow
This commit is contained in:
parent
838047bb4c
commit
7d66a6ff66
12 changed files with 278 additions and 29 deletions
|
@ -120,6 +120,15 @@ export const emailVerificationCodes = sqliteTable("emailVerificationCodes", {
|
|||
expiresAt: integer("expiresAt").notNull(),
|
||||
});
|
||||
|
||||
export const passwordResetTokens = sqliteTable("passwordResetTokens", {
|
||||
id: integer("id").primaryKey({ autoIncrement: true }),
|
||||
userId: text("userId")
|
||||
.notNull()
|
||||
.references(() => users.id, { onDelete: "cascade" }),
|
||||
tokenHash: text("tokenHash").notNull(),
|
||||
expiresAt: integer("expiresAt").notNull(),
|
||||
});
|
||||
|
||||
// Define the model types for type inference
|
||||
export type Org = InferSelectModel<typeof orgs>;
|
||||
export type User = InferSelectModel<typeof users>;
|
||||
|
@ -133,3 +142,4 @@ export type EmailVerificationCode = InferSelectModel<
|
|||
typeof emailVerificationCodes
|
||||
>;
|
||||
export type TwoFactorBackupCode = InferSelectModel<typeof twoFactorBackupCodes>;
|
||||
export type PasswordResetToken = InferSelectModel<typeof passwordResetTokens>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue