@better-auth/sso 1.4.0-beta.13 → 1.4.0-beta.14

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,19 +1,19 @@
1
1
 
2
- > @better-auth/sso@1.4.0-beta.13 build /home/runner/work/better-auth/better-auth/packages/sso
2
+ > @better-auth/sso@1.4.0-beta.14 build /home/runner/work/better-auth/better-auth/packages/sso
3
3
  > tsdown
4
4
 
5
- ℹ tsdown v0.15.9 powered by rolldown v1.0.0-beta.44
5
+ ℹ tsdown v0.15.10 powered by rolldown v1.0.0-beta.44
6
6
  ℹ Using tsdown config: /home/runner/work/better-auth/better-auth/packages/sso/tsdown.config.ts
7
7
  ℹ entry: src/client.ts, src/index.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
- ℹ [CJS] dist/client.cjs  0.19 kB │ gzip: 0.17 kB
10
+ ℹ [CJS] dist/client.cjs  0.19 kB │ gzip: 0.16 kB
11
11
  ℹ [CJS] dist/index.cjs  0.08 kB │ gzip: 0.08 kB
12
- ℹ [CJS] dist/src-BYOa9Nr6.cjs 52.34 kB │ gzip: 9.21 kB
12
+ ℹ [CJS] dist/src-BsLnNXTo.cjs 52.34 kB │ gzip: 9.21 kB
13
13
  ℹ [CJS] 3 files, total: 52.61 kB
14
14
  ℹ [ESM] dist/client.js  0.18 kB │ gzip: 0.16 kB
15
15
  ℹ [ESM] dist/index.js  0.06 kB │ gzip: 0.07 kB
16
- ℹ [ESM] dist/src-KQzfNIm4.js 49.59 kB │ gzip: 8.54 kB
16
+ ℹ [ESM] dist/src-BEPbgggK.js 49.59 kB │ gzip: 8.54 kB
17
17
  ℹ [ESM] dist/index.d.ts  0.24 kB │ gzip: 0.16 kB
18
18
  ℹ [ESM] dist/client.d.ts  0.21 kB │ gzip: 0.18 kB
19
19
  ℹ [ESM] dist/index-CL9gq2xe.d.ts 21.42 kB │ gzip: 3.10 kB
@@ -22,4 +22,4 @@
22
22
  ℹ [CJS] dist/client.d.cts  0.21 kB │ gzip: 0.18 kB
23
23
  ℹ [CJS] dist/index-N2GvRGik.d.cts 21.42 kB │ gzip: 3.10 kB
24
24
  ℹ [CJS] 3 files, total: 21.88 kB
25
- ✔ Build complete in 8810ms
25
+ ✔ Build complete in 8609ms
package/dist/client.cjs CHANGED
@@ -1,4 +1,4 @@
1
- require('./src-BYOa9Nr6.cjs');
1
+ require('./src-BsLnNXTo.cjs');
2
2
 
3
3
  //#region src/client.ts
4
4
  const ssoClient = () => {
package/dist/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./src-KQzfNIm4.js";
1
+ import "./src-BEPbgggK.js";
2
2
 
3
3
  //#region src/client.ts
4
4
  const ssoClient = () => {
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- const require_src = require('./src-BYOa9Nr6.cjs');
1
+ const require_src = require('./src-BsLnNXTo.cjs');
2
2
 
3
3
  exports.sso = require_src.sso;
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as sso } from "./src-KQzfNIm4.js";
1
+ import { t as sso } from "./src-BEPbgggK.js";
2
2
 
3
3
  export { sso };
@@ -1,13 +1,13 @@
1
+ import { BetterFetchError, betterFetch } from "@better-fetch/fetch";
1
2
  import { generateState } from "better-auth";
2
3
  import { APIError, sessionMiddleware } from "better-auth/api";
4
+ import { setSessionCookie } from "better-auth/cookies";
3
5
  import { createAuthorizationURL, handleOAuthUserInfo, parseState, validateAuthorizationCode, validateToken } from "better-auth/oauth2";
4
6
  import { createAuthEndpoint } from "better-auth/plugins";
5
- import * as z from "zod/v4";
6
- import * as saml from "samlify";
7
- import { BetterFetchError, betterFetch } from "@better-fetch/fetch";
8
- import { decodeJwt } from "jose";
9
- import { setSessionCookie } from "better-auth/cookies";
10
7
  import { XMLValidator } from "fast-xml-parser";
8
+ import { decodeJwt } from "jose";
9
+ import * as saml from "samlify";
10
+ import * as z from "zod/v4";
11
11
 
12
12
  //#region src/index.ts
13
13
  saml.setSchemaValidator({ async validate(xml) {
@@ -21,26 +21,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  }) : target, mod));
22
22
 
23
23
  //#endregion
24
+ let __better_fetch_fetch = require("@better-fetch/fetch");
25
+ __better_fetch_fetch = __toESM(__better_fetch_fetch);
24
26
  let better_auth = require("better-auth");
25
27
  better_auth = __toESM(better_auth);
26
28
  let better_auth_api = require("better-auth/api");
27
29
  better_auth_api = __toESM(better_auth_api);
30
+ let better_auth_cookies = require("better-auth/cookies");
31
+ better_auth_cookies = __toESM(better_auth_cookies);
28
32
  let better_auth_oauth2 = require("better-auth/oauth2");
29
33
  better_auth_oauth2 = __toESM(better_auth_oauth2);
30
34
  let better_auth_plugins = require("better-auth/plugins");
31
35
  better_auth_plugins = __toESM(better_auth_plugins);
32
- let zod_v4 = require("zod/v4");
33
- zod_v4 = __toESM(zod_v4);
34
- let samlify = require("samlify");
35
- samlify = __toESM(samlify);
36
- let __better_fetch_fetch = require("@better-fetch/fetch");
37
- __better_fetch_fetch = __toESM(__better_fetch_fetch);
38
- let jose = require("jose");
39
- jose = __toESM(jose);
40
- let better_auth_cookies = require("better-auth/cookies");
41
- better_auth_cookies = __toESM(better_auth_cookies);
42
36
  let fast_xml_parser = require("fast-xml-parser");
43
37
  fast_xml_parser = __toESM(fast_xml_parser);
38
+ let jose = require("jose");
39
+ jose = __toESM(jose);
40
+ let samlify = require("samlify");
41
+ samlify = __toESM(samlify);
42
+ let zod_v4 = require("zod/v4");
43
+ zod_v4 = __toESM(zod_v4);
44
44
 
45
45
  //#region src/index.ts
46
46
  samlify.setSchemaValidator({ async validate(xml) {
package/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "@better-auth/sso",
3
3
  "author": "Bereket Engida",
4
- "version": "1.4.0-beta.13",
4
+ "version": "1.4.0-beta.14",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
+ "homepage": "https://www.better-auth.com/docs/plugins/sso",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/better-auth/better-auth",
11
+ "directory": "packages/sso"
12
+ },
7
13
  "license": "MIT",
8
14
  "keywords": [
9
15
  "sso",
@@ -60,11 +66,11 @@
60
66
  "better-call": "1.0.24",
61
67
  "body-parser": "^2.2.0",
62
68
  "express": "^5.1.0",
63
- "tsdown": "^0.15.9",
64
- "better-auth": "^1.4.0-beta.13"
69
+ "tsdown": "^0.15.10",
70
+ "better-auth": "^1.4.0-beta.14"
65
71
  },
66
72
  "peerDependencies": {
67
- "better-auth": "1.4.0-beta.13"
73
+ "better-auth": "1.4.0-beta.14"
68
74
  },
69
75
  "scripts": {
70
76
  "test": "vitest",
package/src/index.ts CHANGED
@@ -1,12 +1,14 @@
1
+ import { BetterFetchError, betterFetch } from "@better-fetch/fetch";
1
2
  import {
2
- generateState,
3
3
  type Account,
4
4
  type BetterAuthPlugin,
5
+ generateState,
5
6
  type OAuth2Tokens,
6
7
  type Session,
7
8
  type User,
8
9
  } from "better-auth";
9
10
  import { APIError, sessionMiddleware } from "better-auth/api";
11
+ import { setSessionCookie } from "better-auth/cookies";
10
12
  import {
11
13
  createAuthorizationURL,
12
14
  handleOAuthUserInfo,
@@ -14,17 +16,14 @@ import {
14
16
  validateAuthorizationCode,
15
17
  validateToken,
16
18
  } from "better-auth/oauth2";
17
-
18
19
  import { createAuthEndpoint } from "better-auth/plugins";
19
- import * as z from "zod/v4";
20
+ import { XMLValidator } from "fast-xml-parser";
21
+ import { decodeJwt } from "jose";
20
22
  import * as saml from "samlify";
21
23
  import type { BindingContext } from "samlify/types/src/entity";
22
- import { betterFetch, BetterFetchError } from "@better-fetch/fetch";
23
- import { decodeJwt } from "jose";
24
- import { setSessionCookie } from "better-auth/cookies";
25
- import type { FlowResult } from "samlify/types/src/flow";
26
- import { XMLValidator } from "fast-xml-parser";
27
24
  import type { IdentityProvider } from "samlify/types/src/entity-idp";
25
+ import type { FlowResult } from "samlify/types/src/flow";
26
+ import * as z from "zod/v4";
28
27
 
29
28
  const fastValidator = {
30
29
  async validate(xml: string) {
package/src/oidc.test.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { afterAll, beforeAll, describe, expect, it } from "vitest";
2
- import { getTestInstanceMemory as getTestInstance } from "better-auth/test";
3
- import { sso } from ".";
4
- import { OAuth2Server } from "oauth2-mock-server";
5
1
  import { betterFetch } from "@better-fetch/fetch";
6
- import { organization } from "better-auth/plugins";
7
2
  import { createAuthClient } from "better-auth/client";
3
+ import { organization } from "better-auth/plugins";
4
+ import { getTestInstanceMemory as getTestInstance } from "better-auth/test";
5
+ import { OAuth2Server } from "oauth2-mock-server";
6
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
7
+ import { sso } from ".";
8
8
  import { ssoClient } from "./client";
9
9
 
10
10
  let server = new OAuth2Server();
package/src/saml.test.ts CHANGED
@@ -1,31 +1,31 @@
1
- import {
2
- afterAll,
3
- beforeAll,
4
- beforeEach,
5
- describe,
6
- expect,
7
- it,
8
- vi,
9
- } from "vitest";
1
+ import { betterFetch } from "@better-fetch/fetch";
10
2
  import { betterAuth } from "better-auth";
11
3
  import { memoryAdapter } from "better-auth/adapters/memory";
12
4
  import { createAuthClient } from "better-auth/client";
13
- import { betterFetch } from "@better-fetch/fetch";
14
5
  import { setCookieToHeader } from "better-auth/cookies";
15
6
  import { bearer } from "better-auth/plugins";
16
- import { sso } from ".";
17
- import { ssoClient } from "./client";
18
- import { createServer } from "http";
19
- import * as saml from "samlify";
7
+ import { getTestInstanceMemory } from "better-auth/test";
8
+ import bodyParser from "body-parser";
9
+ import { randomUUID } from "crypto";
20
10
  import type {
21
11
  Application as ExpressApp,
22
12
  Request as ExpressRequest,
23
13
  Response as ExpressResponse,
24
14
  } from "express";
25
15
  import express from "express";
26
- import bodyParser from "body-parser";
27
- import { randomUUID } from "crypto";
28
- import { getTestInstanceMemory } from "better-auth/test";
16
+ import { createServer } from "http";
17
+ import * as saml from "samlify";
18
+ import {
19
+ afterAll,
20
+ beforeAll,
21
+ beforeEach,
22
+ describe,
23
+ expect,
24
+ it,
25
+ vi,
26
+ } from "vitest";
27
+ import { sso } from ".";
28
+ import { ssoClient } from "./client";
29
29
 
30
30
  const spMetadata = `
31
31
  <md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="http://localhost:3001/api/sso/saml2/sp/metadata">