@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.
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/sso@1.4.
|
|
2
|
+
> @better-auth/sso@1.4.17 build /home/runner/work/better-auth/better-auth/packages/sso
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
5
|
[34mℹ[39m tsdown [2mv0.17.2[22m powered by rolldown [2mv1.0.0-beta.53[22m
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
[34mℹ[39m entry: [34msrc/index.ts, src/client.ts[39m
|
|
8
8
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
9
|
[34mℹ[39m Build start
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m99.
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m99.41 kB[22m [2m│ gzip: 19.47 kB[22m
|
|
11
11
|
[34mℹ[39m [2mdist/[22m[1mclient.mjs[22m [2m 0.15 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
12
12
|
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m 1.67 kB[22m [2m│ gzip: 0.57 kB[22m
|
|
13
13
|
[34mℹ[39m [2mdist/[22m[32m[1mclient.d.mts[22m[39m [2m 0.49 kB[22m [2m│ gzip: 0.30 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
15
|
-
[34mℹ[39m 5 files, total:
|
|
16
|
-
[32m✔[39m Build complete in [
|
|
14
|
+
[34mℹ[39m [2mdist/[22m[32mindex-XUgmj4eH.d.mts[39m [2m44.12 kB[22m [2m│ gzip: 9.09 kB[22m
|
|
15
|
+
[34mℹ[39m 5 files, total: 145.84 kB
|
|
16
|
+
[32m✔[39m Build complete in [32m18735ms[39m
|
package/dist/client.d.mts
CHANGED
|
@@ -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-
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
70
|
+
"better-auth": "1.4.17"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@better-auth/utils": "0.3.0",
|
|
74
|
-
"better-auth": "1.4.
|
|
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
|
|
2203
|
+
value: providerId,
|
|
2209
2204
|
},
|
|
2210
2205
|
],
|
|
2211
2206
|
})
|