diff --git a/apps/demo/CHANGELOG.md b/apps/demo/CHANGELOG.md index d487799..9491481 100644 --- a/apps/demo/CHANGELOG.md +++ b/apps/demo/CHANGELOG.md @@ -1,5 +1,11 @@ # @authhero/demo +## 0.0.29 + +### Patch Changes + +- authhero@0.2.31 + ## 0.0.28 ### Patch Changes diff --git a/apps/demo/package.json b/apps/demo/package.json index 0bc599a..ee87334 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -1,7 +1,7 @@ { "name": "@authhero/demo", "private": true, - "version": "0.0.28", + "version": "0.0.29", "scripts": { "dev": "bun --watch src/bun.ts" }, diff --git a/packages/adapter-interfaces/CHANGELOG.md b/packages/adapter-interfaces/CHANGELOG.md index 791f20d..8a37b7f 100644 --- a/packages/adapter-interfaces/CHANGELOG.md +++ b/packages/adapter-interfaces/CHANGELOG.md @@ -1,5 +1,15 @@ # @authhero/adapter-interfaces +## 0.17.0 + +### Minor Changes + +- Change to use a json field for connection options + +### Patch Changes + +- Add more properties to connection options + ## 0.16.0 ### Minor Changes diff --git a/packages/adapter-interfaces/package.json b/packages/adapter-interfaces/package.json index 77c4208..03adf54 100644 --- a/packages/adapter-interfaces/package.json +++ b/packages/adapter-interfaces/package.json @@ -11,7 +11,7 @@ "type": "git", "url": "https://github.com/markusahlstrand/authhero" }, - "version": "0.16.0", + "version": "0.17.0", "files": [ "dist" ], diff --git a/packages/adapter-interfaces/src/types/Connection.ts b/packages/adapter-interfaces/src/types/Connection.ts index 206d639..23a5187 100644 --- a/packages/adapter-interfaces/src/types/Connection.ts +++ b/packages/adapter-interfaces/src/types/Connection.ts @@ -29,11 +29,12 @@ export const connectionInsertSchema = z.object({ client_secret: z.string().optional(), app_secret: z.string().optional(), scope: z.string().optional(), + authorization_endpoint: z.string().default("").optional(), + token_endpoint: z.string().default("").optional(), }) .default({}) .optional(), enabled_clients: z.array(z.string()).default([]).optional(), - authorization_endpoint: z.string().default("").optional(), response_type: z.custom().optional(), response_mode: z.custom().optional(), }); diff --git a/packages/authhero/CHANGELOG.md b/packages/authhero/CHANGELOG.md index d0ab029..a75c595 100644 --- a/packages/authhero/CHANGELOG.md +++ b/packages/authhero/CHANGELOG.md @@ -1,5 +1,13 @@ # authhero +## 0.2.31 + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - @authhero/adapter-interfaces@0.17.0 + ## 0.2.30 ### Patch Changes diff --git a/packages/authhero/package.json b/packages/authhero/package.json index 0276210..0cf03b5 100644 --- a/packages/authhero/package.json +++ b/packages/authhero/package.json @@ -1,6 +1,6 @@ { "name": "authhero", - "version": "0.2.30", + "version": "0.2.31", "files": [ "dist" ], diff --git a/packages/drizzle/CHANGELOG.md b/packages/drizzle/CHANGELOG.md index 5ac5bdc..fb54544 100644 --- a/packages/drizzle/CHANGELOG.md +++ b/packages/drizzle/CHANGELOG.md @@ -1,5 +1,13 @@ # @authhero/drizzle +## 0.1.47 + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - @authhero/adapter-interfaces@0.17.0 + ## 0.1.46 ### Patch Changes diff --git a/packages/drizzle/package.json b/packages/drizzle/package.json index cd835e1..1aa6465 100644 --- a/packages/drizzle/package.json +++ b/packages/drizzle/package.json @@ -11,7 +11,7 @@ "type": "git", "url": "https://github.com/markusahlstrand/authhero" }, - "version": "0.1.46", + "version": "0.1.47", "files": [ "dist" ], diff --git a/packages/kysely/CHANGELOG.md b/packages/kysely/CHANGELOG.md index 27b9fad..eb8e788 100644 --- a/packages/kysely/CHANGELOG.md +++ b/packages/kysely/CHANGELOG.md @@ -1,5 +1,17 @@ # @authhero/kysely-adapter +## 0.11.0 + +### Minor Changes + +- Change to use a json field for connection options + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - @authhero/adapter-interfaces@0.17.0 + ## 0.10.0 ### Minor Changes diff --git a/packages/kysely/package.json b/packages/kysely/package.json index 8bae431..b4b79d2 100644 --- a/packages/kysely/package.json +++ b/packages/kysely/package.json @@ -11,7 +11,7 @@ "type": "git", "url": "https://github.com/markusahlstrand/authhero" }, - "version": "0.10.0", + "version": "0.11.0", "files": [ "dist" ], diff --git a/packages/kysely/src/connections/create.ts b/packages/kysely/src/connections/create.ts index 08c950b..4930d9c 100644 --- a/packages/kysely/src/connections/create.ts +++ b/packages/kysely/src/connections/create.ts @@ -2,7 +2,6 @@ import { nanoid } from "nanoid"; import { Kysely } from "kysely"; import { Connection, ConnectionInsert } from "@authhero/adapter-interfaces"; import { Database } from "../db"; -import { flattenObject } from "../utils/flatten"; export function create(db: Kysely) { return async ( @@ -18,7 +17,12 @@ export function create(db: Kysely) { await db .insertInto("connections") - .values({ ...flattenObject(connection), tenant_id }) + .values({ + ...connection, + // The connection options will have many different properties depending on the strategy + options: JSON.stringify(connection.options || {}), + tenant_id, + }) .execute(); return connection; diff --git a/packages/kysely/src/connections/get.ts b/packages/kysely/src/connections/get.ts index b1206ff..62065dc 100644 --- a/packages/kysely/src/connections/get.ts +++ b/packages/kysely/src/connections/get.ts @@ -2,7 +2,6 @@ import { Kysely } from "kysely"; import { removeNullProperties } from "../helpers/remove-nulls"; import { Connection } from "@authhero/adapter-interfaces"; import { Database } from "../db"; -import { unflattenObject } from "../utils/flatten"; export function get(db: Kysely) { return async ( @@ -20,6 +19,9 @@ export function get(db: Kysely) { return null; } - return removeNullProperties(unflattenObject(connection, ["options"])); + return removeNullProperties({ + ...connection, + options: JSON.parse(connection.options), + }); }; } diff --git a/packages/kysely/src/connections/update.ts b/packages/kysely/src/connections/update.ts index 94a9078..e7725d9 100644 --- a/packages/kysely/src/connections/update.ts +++ b/packages/kysely/src/connections/update.ts @@ -1,7 +1,6 @@ import { Kysely } from "kysely"; import { ConnectionInsert } from "@authhero/adapter-interfaces"; import { Database } from "../db"; -import { flattenObject } from "../utils/flatten"; export function update(db: Kysely) { return async ( @@ -16,7 +15,12 @@ export function update(db: Kysely) { await db .updateTable("connections") - .set(flattenObject(sqlConnection)) + .set({ + ...sqlConnection, + options: sqlConnection.options + ? JSON.stringify(sqlConnection.options) + : undefined, + }) .where("connections.id", "=", connection_id) .where("connections.tenant_id", "=", tenant_id) .execute(); diff --git a/packages/saml/CHANGELOG.md b/packages/saml/CHANGELOG.md index 018a3ed..0edcd6a 100644 --- a/packages/saml/CHANGELOG.md +++ b/packages/saml/CHANGELOG.md @@ -1,5 +1,13 @@ # @authhero/saml +## 0.1.47 + +### Patch Changes + +- Updated dependencies +- Updated dependencies + - @authhero/adapter-interfaces@0.17.0 + ## 0.1.46 ### Patch Changes diff --git a/packages/saml/package.json b/packages/saml/package.json index 52576fb..1ee3327 100644 --- a/packages/saml/package.json +++ b/packages/saml/package.json @@ -11,7 +11,7 @@ "type": "git", "url": "https://github.com/markusahlstrand/authhero" }, - "version": "0.1.46", + "version": "0.1.47", "files": [ "dist" ],