fix: disable api key hashing

This commit is contained in:
Henry
2025-06-01 00:12:16 +01:00
parent 1d00aa78b4
commit 471f36a9c9
2 changed files with 3 additions and 2 deletions

View File

@@ -42,7 +42,8 @@ export const initAuth = (db: dbClient) => {
}, },
}, },
plugins: [ plugins: [
apiKey(), // @todo: hasing is disabled due to a bug in the api key plugin
apiKey({ disableKeyHashing: true }),
magicLink({ magicLink({
expiresIn: 60 * 60 * 24 * 7, // 7 days expiresIn: 60 * 60 * 24 * 7, // 7 days
sendMagicLink: async ({ email, url }) => { sendMagicLink: async ({ email, url }) => {

View File

@@ -51,7 +51,7 @@ export const verification = pgTable("verification", {
updatedAt: timestamp("updatedAt"), updatedAt: timestamp("updatedAt"),
}).enableRLS(); }).enableRLS();
export const apiKey = pgTable("apikey", { export const apiKey = pgTable("apiKey", {
id: bigserial("id", { mode: "number" }).primaryKey(), id: bigserial("id", { mode: "number" }).primaryKey(),
name: text("name"), name: text("name"),
start: text("start"), start: text("start"),