More fixes in SSO

This commit is contained in:
Arunavo Ray
2025-07-26 20:33:26 +05:30
parent 1f6add5fff
commit 0920314679
8 changed files with 1866 additions and 14 deletions

View File

@@ -78,6 +78,7 @@ export {
sessions,
accounts,
verificationTokens,
verifications,
oauthApplications,
oauthAccessTokens,
oauthConsent,

View File

@@ -518,6 +518,24 @@ export const verificationTokens = sqliteTable("verification_tokens", {
};
});
// Verifications table (for Better Auth)
export const verifications = sqliteTable("verifications", {
id: text("id").primaryKey(),
identifier: text("identifier").notNull(),
value: text("value").notNull(),
expiresAt: integer("expires_at", { mode: "timestamp" }).notNull(),
createdAt: integer("created_at", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
updatedAt: integer("updated_at", { mode: "timestamp" })
.notNull()
.default(sql`(unixepoch())`),
}, (table) => {
return {
identifierIdx: index("idx_verifications_identifier").on(table.identifier),
};
});
// ===== OIDC Provider Tables =====
// OAuth Applications table