@better-auth/sso 1.6.8 → 1.6.10

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.
package/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-C38stf-Q.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-Bwp02oze.mjs";
2
2
  //#region src/client.ts
3
3
  const ssoClient = (options) => {
4
4
  return {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-C38stf-Q.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-Bwp02oze.mjs";
2
2
  import { APIError, createAuthEndpoint, createAuthMiddleware, getSessionFromCtx, sessionMiddleware } from "better-auth/api";
3
3
  import { XMLParser, XMLValidator } from "fast-xml-parser";
4
4
  import { X509Certificate } from "node:crypto";
@@ -1832,15 +1832,9 @@ const spMetadata = (options) => {
1832
1832
  responses: { "200": { description: "SAML metadata in XML format" } }
1833
1833
  } }
1834
1834
  }, async (ctx) => {
1835
- const provider = await ctx.context.adapter.findOne({
1836
- model: "ssoProvider",
1837
- where: [{
1838
- field: "providerId",
1839
- value: ctx.query.providerId
1840
- }]
1841
- });
1835
+ const provider = await findSAMLProvider(ctx.query.providerId, options, ctx.context.adapter);
1842
1836
  if (!provider) throw new APIError("NOT_FOUND", { message: "No provider found for the given providerId" });
1843
- const parsedSamlConfig = safeJsonParse(provider.samlConfig);
1837
+ const parsedSamlConfig = provider.samlConfig;
1844
1838
  if (!parsedSamlConfig) throw new APIError("BAD_REQUEST", { message: "Invalid SAML configuration" });
1845
1839
  const sloLocation = `${ctx.context.baseURL}/sso/saml2/sp/slo/${ctx.query.providerId}`;
1846
1840
  const singleLogoutService = options?.saml?.enableSingleLogout ? [{
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.6.8";
3
+ const PACKAGE_VERSION = "1.6.10";
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/sso",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "SSO plugin for Better Auth",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -70,15 +70,15 @@
70
70
  "express": "^5.2.1",
71
71
  "oauth2-mock-server": "^8.2.2",
72
72
  "tsdown": "0.21.1",
73
- "@better-auth/core": "1.6.8",
74
- "better-auth": "1.6.8"
73
+ "@better-auth/core": "1.6.10",
74
+ "better-auth": "1.6.10"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@better-auth/utils": "0.4.0",
78
78
  "@better-fetch/fetch": "1.1.21",
79
79
  "better-call": "1.3.5",
80
- "@better-auth/core": "^1.6.8",
81
- "better-auth": "^1.6.8"
80
+ "@better-auth/core": "^1.6.10",
81
+ "better-auth": "^1.6.10"
82
82
  },
83
83
  "scripts": {
84
84
  "build": "tsdown",