@better-auth/sso 1.6.4 → 1.6.6

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-Cdjp2bOq.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-G_DbEvps.mjs";
2
2
  //#region src/client.ts
3
3
  const ssoClient = (options) => {
4
4
  return {
package/dist/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
- import { t as PACKAGE_VERSION } from "./version-Cdjp2bOq.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-G_DbEvps.mjs";
2
2
  import { APIError, createAuthEndpoint, createAuthMiddleware, getSessionFromCtx, sessionMiddleware } from "better-auth/api";
3
3
  import { XMLParser, XMLValidator } from "fast-xml-parser";
4
- import * as saml from "samlify";
5
4
  import { X509Certificate } from "node:crypto";
6
5
  import { getHostname } from "tldts";
7
6
  import { generateRandomString } from "better-auth/crypto";
@@ -13,6 +12,8 @@ import { deleteSessionCookie, setSessionCookie } from "better-auth/cookies";
13
12
  import { handleOAuthUserInfo } from "better-auth/oauth2";
14
13
  import { decodeJwt } from "jose";
15
14
  import { defineErrorCodes } from "@better-auth/core/utils/error-codes";
15
+ import * as samlifyNamespace from "samlify";
16
+ import samlifyDefault from "samlify";
16
17
  //#region src/constants.ts
17
18
  /**
18
19
  * SAML Constants
@@ -1411,6 +1412,7 @@ async function parseRelayState(c) {
1411
1412
  if (!parsedData.errorURL) parsedData.errorURL = errorURL;
1412
1413
  return parsedData;
1413
1414
  }
1415
+ const saml = typeof samlifyNamespace.SPMetadata === "function" && typeof samlifyNamespace.setSchemaValidator === "function" ? samlifyNamespace : samlifyDefault ?? samlifyNamespace;
1414
1416
  //#endregion
1415
1417
  //#region src/routes/helpers.ts
1416
1418
  async function findSAMLProvider(providerId, options, adapter) {
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.6.4";
3
+ const PACKAGE_VERSION = "1.6.6";
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.4",
3
+ "version": "1.6.6",
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.4",
74
- "better-auth": "1.6.4"
73
+ "@better-auth/core": "1.6.6",
74
+ "better-auth": "1.6.6"
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.4",
81
- "better-auth": "^1.6.4"
80
+ "@better-auth/core": "^1.6.6",
81
+ "better-auth": "^1.6.6"
82
82
  },
83
83
  "scripts": {
84
84
  "build": "tsdown",