@better-auth/sso 1.4.15 → 1.4.17

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @better-auth/sso@1.4.15 build /home/runner/work/better-auth/better-auth/packages/sso
2
+ > @better-auth/sso@1.4.17 build /home/runner/work/better-auth/better-auth/packages/sso
3
3
  > tsdown
4
4
 
5
5
  ℹ tsdown v0.17.2 powered by rolldown v1.0.0-beta.53
@@ -7,10 +7,10 @@
7
7
  ℹ entry: src/index.ts, src/client.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
- ℹ dist/index.mjs 99.53 kB │ gzip: 19.50 kB
10
+ ℹ dist/index.mjs 99.41 kB │ gzip: 19.47 kB
11
11
  ℹ dist/client.mjs  0.15 kB │ gzip: 0.14 kB
12
12
  ℹ dist/index.d.mts  1.67 kB │ gzip: 0.57 kB
13
13
  ℹ dist/client.d.mts  0.49 kB │ gzip: 0.30 kB
14
- ℹ dist/index-D4Ey-vkQ.d.mts 44.21 kB │ gzip: 9.10 kB
15
- ℹ 5 files, total: 146.05 kB
16
- ✔ Build complete in 18069ms
14
+ ℹ dist/index-XUgmj4eH.d.mts 44.12 kB │ gzip: 9.09 kB
15
+ ℹ 5 files, total: 145.84 kB
16
+ ✔ Build complete in 18735ms
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as SSOPlugin } from "./index-D4Ey-vkQ.mjs";
1
+ import { t as SSOPlugin } from "./index-XUgmj4eH.mjs";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  interface SSOClientOptions {
@@ -945,9 +945,6 @@ declare const callbackSSOSAML: (options?: SSOOptions) => better_call0.StrictEndp
945
945
  }, never>;
946
946
  declare const acsEndpoint: (options?: SSOOptions) => better_call0.StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
947
947
  method: "POST";
948
- params: z.ZodObject<{
949
- providerId: z.ZodOptional<z.ZodString>;
950
- }, z.core.$strip>;
951
948
  body: z.ZodObject<{
952
949
  SAMLResponse: z.ZodString;
953
950
  RelayState: z.ZodOptional<z.ZodString>;
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as DataEncryptionAlgorithm, C as TimestampValidationOptions, D as SSOOptions, E as SAMLConfig, M as DigestAlgorithm, N as KeyEncryptionAlgorithm, O as SSOProvider, P as SignatureAlgorithm, S as SAMLConditions, T as OIDCConfig, _ as REQUIRED_DISCOVERY_FIELDS, a as fetchDiscoveryDocument, b as DEFAULT_MAX_SAML_METADATA_SIZE, c as normalizeUrl, d as validateDiscoveryUrl, f as DiscoverOIDCConfigParams, g as OIDCDiscoveryDocument, h as HydratedOIDCConfig, i as discoverOIDCConfig, j as DeprecatedAlgorithmBehavior, k as AlgorithmValidationOptions, l as selectTokenEndpointAuthMethod, m as DiscoveryErrorCode, n as sso, o as needsRuntimeDiscovery, p as DiscoveryError, r as computeDiscoveryUrl, s as normalizeDiscoveryUrls, t as SSOPlugin, u as validateDiscoveryDocument, v as RequiredDiscoveryField, w as validateSAMLTimestamp, x as DEFAULT_MAX_SAML_RESPONSE_SIZE, y as DEFAULT_CLOCK_SKEW_MS } from "./index-D4Ey-vkQ.mjs";
1
+ import { A as DataEncryptionAlgorithm, C as TimestampValidationOptions, D as SSOOptions, E as SAMLConfig, M as DigestAlgorithm, N as KeyEncryptionAlgorithm, O as SSOProvider, P as SignatureAlgorithm, S as SAMLConditions, T as OIDCConfig, _ as REQUIRED_DISCOVERY_FIELDS, a as fetchDiscoveryDocument, b as DEFAULT_MAX_SAML_METADATA_SIZE, c as normalizeUrl, d as validateDiscoveryUrl, f as DiscoverOIDCConfigParams, g as OIDCDiscoveryDocument, h as HydratedOIDCConfig, i as discoverOIDCConfig, j as DeprecatedAlgorithmBehavior, k as AlgorithmValidationOptions, l as selectTokenEndpointAuthMethod, m as DiscoveryErrorCode, n as sso, o as needsRuntimeDiscovery, p as DiscoveryError, r as computeDiscoveryUrl, s as normalizeDiscoveryUrls, t as SSOPlugin, u as validateDiscoveryDocument, v as RequiredDiscoveryField, w as validateSAMLTimestamp, x as DEFAULT_MAX_SAML_RESPONSE_SIZE, y as DEFAULT_CLOCK_SKEW_MS } from "./index-XUgmj4eH.mjs";
2
2
  export { AlgorithmValidationOptions, DEFAULT_CLOCK_SKEW_MS, DEFAULT_MAX_SAML_METADATA_SIZE, DEFAULT_MAX_SAML_RESPONSE_SIZE, DataEncryptionAlgorithm, DeprecatedAlgorithmBehavior, DigestAlgorithm, DiscoverOIDCConfigParams, DiscoveryError, DiscoveryErrorCode, HydratedOIDCConfig, KeyEncryptionAlgorithm, OIDCConfig, OIDCDiscoveryDocument, REQUIRED_DISCOVERY_FIELDS, RequiredDiscoveryField, SAMLConditions, SAMLConfig, SSOOptions, SSOPlugin, SSOProvider, SignatureAlgorithm, TimestampValidationOptions, computeDiscoveryUrl, discoverOIDCConfig, fetchDiscoveryDocument, needsRuntimeDiscovery, normalizeDiscoveryUrls, normalizeUrl, selectTokenEndpointAuthMethod, sso, validateDiscoveryDocument, validateDiscoveryUrl, validateSAMLTimestamp };
package/dist/index.mjs CHANGED
@@ -2077,7 +2077,6 @@ const callbackSSOSAML = (options) => {
2077
2077
  throw ctx.redirect(callbackUrl);
2078
2078
  });
2079
2079
  };
2080
- const acsEndpointParamsSchema = z.object({ providerId: z.string().optional() });
2081
2080
  const acsEndpointBodySchema = z.object({
2082
2081
  SAMLResponse: z.string(),
2083
2082
  RelayState: z.string().optional()
@@ -2085,7 +2084,6 @@ const acsEndpointBodySchema = z.object({
2085
2084
  const acsEndpoint = (options) => {
2086
2085
  return createAuthEndpoint("/sso/saml2/sp/acs/:providerId", {
2087
2086
  method: "POST",
2088
- params: acsEndpointParamsSchema,
2089
2087
  body: acsEndpointBodySchema,
2090
2088
  metadata: {
2091
2089
  ...HIDE_METADATA,
@@ -2117,7 +2115,7 @@ const acsEndpoint = (options) => {
2117
2115
  model: "ssoProvider",
2118
2116
  where: [{
2119
2117
  field: "providerId",
2120
- value: providerId ?? "sso"
2118
+ value: providerId
2121
2119
  }]
2122
2120
  }).then((res) => {
2123
2121
  if (!res) return null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@better-auth/sso",
3
3
  "author": "Bereket Engida",
4
- "version": "1.4.15",
4
+ "version": "1.4.17",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
7
7
  "types": "dist/index.d.mts",
@@ -57,7 +57,7 @@
57
57
  "fast-xml-parser": "^5.2.5",
58
58
  "jose": "^6.1.0",
59
59
  "samlify": "^2.10.1",
60
- "zod": "^4.1.12"
60
+ "zod": "^4.3.5"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/body-parser": "^1.19.6",
@@ -67,11 +67,11 @@
67
67
  "express": "^5.1.0",
68
68
  "oauth2-mock-server": "^8.2.0",
69
69
  "tsdown": "^0.17.2",
70
- "better-auth": "1.4.15"
70
+ "better-auth": "1.4.17"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@better-auth/utils": "0.3.0",
74
- "better-auth": "1.4.15"
74
+ "better-auth": "1.4.17"
75
75
  },
76
76
  "scripts": {
77
77
  "test": "vitest",
package/src/routes/sso.ts CHANGED
@@ -2127,10 +2127,6 @@ export const callbackSSOSAML = (options?: SSOOptions) => {
2127
2127
  );
2128
2128
  };
2129
2129
 
2130
- const acsEndpointParamsSchema = z.object({
2131
- providerId: z.string().optional(),
2132
- });
2133
-
2134
2130
  const acsEndpointBodySchema = z.object({
2135
2131
  SAMLResponse: z.string(),
2136
2132
  RelayState: z.string().optional(),
@@ -2141,7 +2137,6 @@ export const acsEndpoint = (options?: SSOOptions) => {
2141
2137
  "/sso/saml2/sp/acs/:providerId",
2142
2138
  {
2143
2139
  method: "POST",
2144
- params: acsEndpointParamsSchema,
2145
2140
  body: acsEndpointBodySchema,
2146
2141
  metadata: {
2147
2142
  ...HIDE_METADATA,
@@ -2205,7 +2200,7 @@ export const acsEndpoint = (options?: SSOOptions) => {
2205
2200
  where: [
2206
2201
  {
2207
2202
  field: "providerId",
2208
- value: providerId ?? "sso",
2203
+ value: providerId,
2209
2204
  },
2210
2205
  ],
2211
2206
  })