@authhero/drizzle 0.38.2 → 0.40.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.
@@ -5,16 +5,9 @@
5
5
  {
6
6
  "idx": 0,
7
7
  "version": "6",
8
- "when": 1775726716499,
9
- "tag": "0000_good_eternity",
10
- "breakpoints": true
11
- },
12
- {
13
- "idx": 1,
14
- "version": "6",
15
- "when": 1744185600000,
16
- "tag": "0001_add_custom_domains_domain_unique",
8
+ "when": 1776702334667,
9
+ "tag": "0000_watery_loners",
17
10
  "breakpoints": true
18
11
  }
19
12
  ]
20
- }
13
+ }
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.38.2",
14
+ "version": "0.40.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/schema",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "drizzle-orm": "^0.44.2",
36
36
  "nanoid": "^5.0.8",
37
- "@authhero/adapter-interfaces": "1.4.1"
37
+ "@authhero/adapter-interfaces": "1.5.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hono/zod-openapi": "^0.19.2",
@@ -73,28 +73,9 @@ export const loginSessions = sqliteTable(
73
73
  .references(() => tenants.id, { onDelete: "cascade" }),
74
74
  session_id: text("session_id", { length: 21 }),
75
75
  csrf_token: text("csrf_token", { length: 21 }).notNull(),
76
- authParams_client_id: text("authParams_client_id", {
77
- length: 191,
78
- }).notNull(),
79
- authParams_vendor_id: text("authParams_vendor_id", { length: 255 }),
80
- authParams_username: text("authParams_username", { length: 255 }),
81
- authParams_response_type: text("authParams_response_type", { length: 255 }),
82
- authParams_response_mode: text("authParams_response_mode", { length: 255 }),
83
- authParams_audience: text("authParams_audience", { length: 255 }),
84
- authParams_scope: text("authParams_scope"),
85
- authParams_state: text("authParams_state"),
86
- authParams_nonce: text("authParams_nonce", { length: 255 }),
87
- authParams_code_challenge_method: text("authParams_code_challenge_method", {
88
- length: 255,
89
- }),
90
- authParams_code_challenge: text("authParams_code_challenge", {
91
- length: 255,
92
- }),
93
- authParams_redirect_uri: text("authParams_redirect_uri"),
94
- authParams_organization: text("authParams_organization", { length: 255 }),
95
- authParams_prompt: text("authParams_prompt", { length: 32 }),
96
- authParams_act_as: text("authParams_act_as", { length: 256 }),
97
- authParams_ui_locales: text("authParams_ui_locales", { length: 32 }),
76
+ // JSON-serialized authParams. Canonical source of truth. Replaces the
77
+ // legacy hoisted authParams_* columns, which were dropped.
78
+ auth_params: text("auth_params"),
98
79
  authorization_url: text("authorization_url"),
99
80
  created_at_ts: integer("created_at_ts").notNull(),
100
81
  updated_at_ts: integer("updated_at_ts").notNull(),
@@ -107,6 +88,11 @@ export const loginSessions = sqliteTable(
107
88
  failure_reason: text("failure_reason"),
108
89
  user_id: text("user_id", { length: 255 }),
109
90
  auth_connection: text("auth_connection", { length: 255 }),
91
+ auth_strategy_strategy: text("auth_strategy_strategy", { length: 64 }),
92
+ auth_strategy_strategy_type: text("auth_strategy_strategy_type", {
93
+ length: 64,
94
+ }),
95
+ authenticated_at: text("authenticated_at", { length: 35 }),
110
96
  },
111
97
  (table) => [
112
98
  primaryKey({
@@ -1,9 +0,0 @@
1
- -- Remove duplicate domain rows, keeping one row per domain (the earliest inserted)
2
- DELETE FROM `custom_domains`
3
- WHERE rowid NOT IN (
4
- SELECT MIN(rowid)
5
- FROM `custom_domains`
6
- GROUP BY `domain`
7
- );
8
-
9
- CREATE UNIQUE INDEX `custom_domains_domain_unique` ON `custom_domains` (`domain`);
@@ -1,7 +0,0 @@
1
- ALTER TABLE `outbox_events` ADD `dead_lettered_at` text(35);--> statement-breakpoint
2
- ALTER TABLE `outbox_events` ADD `final_error` text;--> statement-breakpoint
3
- ALTER TABLE `users` ADD `registration_completed_at` text(35);--> statement-breakpoint
4
- -- Backfill so legacy users don't re-fire post-user-registration on their
5
- -- next login. The null/non-null state is load-bearing (see
6
- -- postUserLoginHook); the exact timestamp is not exposed externally.
7
- UPDATE `users` SET `registration_completed_at` = `created_at` WHERE `registration_completed_at` IS NULL;
@@ -1 +0,0 @@
1
- CREATE INDEX `idx_outbox_events_tenant_dead_lettered` ON `outbox_events` (`tenant_id`,`dead_lettered_at`);