@authhero/drizzle 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,6 +172,7 @@ CREATE TABLE `login_sessions` (
172
172
  `state_data` text,
173
173
  `failure_reason` text,
174
174
  `user_id` text(255),
175
+ `auth_connection` text(255),
175
176
  PRIMARY KEY(`tenant_id`, `id`),
176
177
  FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
177
178
  );
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.29.0",
14
+ "version": "0.31.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/schema",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "drizzle-orm": "^0.44.2",
44
- "@authhero/adapter-interfaces": "0.149.0"
44
+ "@authhero/adapter-interfaces": "0.150.0"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "tsc && vite build",
@@ -1,8 +1,8 @@
1
1
  import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core";
2
2
  import { tenants } from "./tenants";
3
3
 
4
- export const mfaEnrollments = sqliteTable(
5
- "mfa_enrollments",
4
+ export const authenticationMethods = sqliteTable(
5
+ "authentication_methods",
6
6
  {
7
7
  id: text("id", { length: 26 }).primaryKey(),
8
8
  tenant_id: text("tenant_id", { length: 191 })
@@ -12,11 +12,21 @@ export const mfaEnrollments = sqliteTable(
12
12
  type: text("type", { length: 32 }).notNull(),
13
13
  phone_number: text("phone_number", { length: 32 }),
14
14
  totp_secret: text("totp_secret", { length: 255 }),
15
+ credential_id: text("credential_id", { length: 512 }),
16
+ public_key: text("public_key"),
17
+ sign_count: integer("sign_count"),
18
+ credential_backed_up: integer("credential_backed_up"),
19
+ transports: text("transports", { length: 512 }),
20
+ friendly_name: text("friendly_name", { length: 255 }),
15
21
  confirmed: integer("confirmed").notNull().default(0),
16
22
  created_at_ts: integer("created_at_ts").notNull(),
17
23
  updated_at_ts: integer("updated_at_ts").notNull(),
18
24
  },
19
25
  (table) => [
20
- index("mfa_enrollments_tenant_user_idx").on(table.tenant_id, table.user_id),
26
+ index("authentication_methods_tenant_user_idx").on(
27
+ table.tenant_id,
28
+ table.user_id,
29
+ ),
30
+ index("authentication_methods_credential_id_idx").on(table.credential_id),
21
31
  ],
22
32
  );
@@ -30,8 +30,8 @@ export * from "./roles";
30
30
  // Branding & UI
31
31
  export * from "./branding";
32
32
 
33
- // MFA
34
- export * from "./mfaEnrollments";
33
+ // Authentication Methods
34
+ export * from "./authenticationMethods";
35
35
 
36
36
  // Logs
37
37
  export * from "./logs";
@@ -106,6 +106,7 @@ export const loginSessions = sqliteTable(
106
106
  state_data: text("state_data"), // JSON: { hookId?, continuationScope?, continuationReturnUrl? }
107
107
  failure_reason: text("failure_reason"),
108
108
  user_id: text("user_id", { length: 255 }),
109
+ auth_connection: text("auth_connection", { length: 255 }),
109
110
  },
110
111
  (table) => [
111
112
  primaryKey({