@better-auth/sso 1.7.0-beta.2 → 1.7.0-beta.3
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
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-CLqkeI3u.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";
|
|
@@ -1920,15 +1920,9 @@ const spMetadata = (options) => {
|
|
|
1920
1920
|
responses: { "200": { description: "SAML metadata in XML format" } }
|
|
1921
1921
|
} }
|
|
1922
1922
|
}, async (ctx) => {
|
|
1923
|
-
const provider = await ctx.context.adapter
|
|
1924
|
-
model: "ssoProvider",
|
|
1925
|
-
where: [{
|
|
1926
|
-
field: "providerId",
|
|
1927
|
-
value: ctx.query.providerId
|
|
1928
|
-
}]
|
|
1929
|
-
});
|
|
1923
|
+
const provider = await findSAMLProvider(ctx.query.providerId, options, ctx.context.adapter);
|
|
1930
1924
|
if (!provider) throw new APIError("NOT_FOUND", { message: "No provider found for the given providerId" });
|
|
1931
|
-
const parsedSamlConfig =
|
|
1925
|
+
const parsedSamlConfig = provider.samlConfig;
|
|
1932
1926
|
if (!parsedSamlConfig) throw new APIError("BAD_REQUEST", { message: "Invalid SAML configuration" });
|
|
1933
1927
|
const sp = createSP(parsedSamlConfig, ctx.context.baseURL, ctx.query.providerId, options?.saml?.enableSingleLogout ? { sloOptions: {
|
|
1934
1928
|
wantLogoutRequestSigned: options?.saml?.wantLogoutRequestSigned,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/sso",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.3",
|
|
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.7.0-beta.
|
|
74
|
-
"better-auth": "1.7.0-beta.
|
|
73
|
+
"@better-auth/core": "1.7.0-beta.3",
|
|
74
|
+
"better-auth": "1.7.0-beta.3"
|
|
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.7.0-beta.
|
|
81
|
-
"better-auth": "^1.7.0-beta.
|
|
80
|
+
"@better-auth/core": "^1.7.0-beta.3",
|
|
81
|
+
"better-auth": "^1.7.0-beta.3"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"build": "tsdown",
|