@better-auth/sso 1.4.4 → 1.4.6-beta.2

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,16 +1,16 @@
1
1
 
2
- > @better-auth/sso@1.4.4 build /home/runner/work/better-auth/better-auth/packages/sso
2
+ > @better-auth/sso@1.4.6-beta.2 build /home/runner/work/better-auth/better-auth/packages/sso
3
3
  > tsdown
4
4
 
5
- ℹ tsdown v0.16.5 powered by rolldown v1.0.0-beta.50
5
+ ℹ tsdown v0.16.6 powered by rolldown v1.0.0-beta.51
6
6
  ℹ Using tsdown config: /home/runner/work/better-auth/better-auth/packages/sso/tsdown.config.ts
7
7
  ℹ entry: src/index.ts, src/client.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
10
  ℹ dist/index.mjs 58.49 kB │ gzip: 10.33 kB
11
11
  ℹ dist/client.mjs  0.15 kB │ gzip: 0.14 kB
12
- ℹ dist/client.d.mts  0.49 kB │ gzip: 0.30 kB
12
+ ℹ dist/client.d.mts  0.49 kB │ gzip: 0.29 kB
13
13
  ℹ dist/index.d.mts  0.21 kB │ gzip: 0.15 kB
14
- ℹ dist/index-D-JmJR9N.d.mts 25.42 kB │ gzip: 3.95 kB
14
+ ℹ dist/index-DCyJckhH.d.mts 25.42 kB │ gzip: 3.96 kB
15
15
  ℹ 5 files, total: 84.77 kB
16
- ✔ Build complete in 11610ms
16
+ ✔ Build complete in 11114ms
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as SSOPlugin } from "./index-D-JmJR9N.mjs";
1
+ import { t as SSOPlugin } from "./index-DCyJckhH.mjs";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  interface SSOClientOptions {
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OAuth2Tokens, User } from "better-auth";
3
- import * as better_call0 from "better-call";
3
+ import * as better_call7 from "better-call";
4
4
 
5
5
  //#region src/types.d.ts
6
6
  interface OIDCMapping {
@@ -240,7 +240,7 @@ interface SSOOptions {
240
240
  }
241
241
  //#endregion
242
242
  //#region src/routes/domain-verification.d.ts
243
- declare const requestDomainVerification: (options: SSOOptions) => better_call0.StrictEndpoint<"/sso/request-domain-verification", {
243
+ declare const requestDomainVerification: (options: SSOOptions) => better_call7.StrictEndpoint<"/sso/request-domain-verification", {
244
244
  method: "POST";
245
245
  body: z.ZodObject<{
246
246
  providerId: z.ZodString;
@@ -262,7 +262,7 @@ declare const requestDomainVerification: (options: SSOOptions) => better_call0.S
262
262
  };
263
263
  };
264
264
  };
265
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
265
+ use: ((inputContext: better_call7.MiddlewareInputContext<better_call7.MiddlewareOptions>) => Promise<{
266
266
  session: {
267
267
  session: Record<string, any> & {
268
268
  id: string;
@@ -290,7 +290,7 @@ declare const requestDomainVerification: (options: SSOOptions) => better_call0.S
290
290
  }, {
291
291
  domainVerificationToken: string;
292
292
  }>;
293
- declare const verifyDomain: (options: SSOOptions) => better_call0.StrictEndpoint<"/sso/verify-domain", {
293
+ declare const verifyDomain: (options: SSOOptions) => better_call7.StrictEndpoint<"/sso/verify-domain", {
294
294
  method: "POST";
295
295
  body: z.ZodObject<{
296
296
  providerId: z.ZodString;
@@ -315,7 +315,7 @@ declare const verifyDomain: (options: SSOOptions) => better_call0.StrictEndpoint
315
315
  };
316
316
  };
317
317
  };
318
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
318
+ use: ((inputContext: better_call7.MiddlewareInputContext<better_call7.MiddlewareOptions>) => Promise<{
319
319
  session: {
320
320
  session: Record<string, any> & {
321
321
  id: string;
@@ -343,7 +343,7 @@ declare const verifyDomain: (options: SSOOptions) => better_call0.StrictEndpoint
343
343
  }, void>;
344
344
  //#endregion
345
345
  //#region src/routes/sso.d.ts
346
- declare const spMetadata: () => better_call0.StrictEndpoint<"/sso/saml2/sp/metadata", {
346
+ declare const spMetadata: () => better_call7.StrictEndpoint<"/sso/saml2/sp/metadata", {
347
347
  method: "GET";
348
348
  query: z.ZodObject<{
349
349
  providerId: z.ZodString;
@@ -367,7 +367,7 @@ declare const spMetadata: () => better_call0.StrictEndpoint<"/sso/saml2/sp/metad
367
367
  } & {
368
368
  use: any[];
369
369
  }, Response>;
370
- declare const registerSSOProvider: <O extends SSOOptions>(options: O) => better_call0.StrictEndpoint<"/sso/register", {
370
+ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => better_call7.StrictEndpoint<"/sso/register", {
371
371
  method: "POST";
372
372
  body: z.ZodObject<{
373
373
  providerId: z.ZodString;
@@ -445,7 +445,7 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => better_
445
445
  organizationId: z.ZodOptional<z.ZodString>;
446
446
  overrideUserInfo: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
447
447
  }, z.core.$strip>;
448
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
448
+ use: ((inputContext: better_call7.MiddlewareInputContext<better_call7.MiddlewareOptions>) => Promise<{
449
449
  session: {
450
450
  session: Record<string, any> & {
451
451
  id: string;
@@ -637,7 +637,7 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => better_
637
637
  domainVerified: boolean;
638
638
  domainVerificationToken: string;
639
639
  } & SSOProvider<O> : SSOProvider<O>>;
640
- declare const signInSSO: (options?: SSOOptions) => better_call0.StrictEndpoint<"/sign-in/sso", {
640
+ declare const signInSSO: (options?: SSOOptions) => better_call7.StrictEndpoint<"/sign-in/sso", {
641
641
  method: "POST";
642
642
  body: z.ZodObject<{
643
643
  email: z.ZodOptional<z.ZodString>;
@@ -733,7 +733,7 @@ declare const signInSSO: (options?: SSOOptions) => better_call0.StrictEndpoint<"
733
733
  url: string;
734
734
  redirect: boolean;
735
735
  }>;
736
- declare const callbackSSO: (options?: SSOOptions) => better_call0.StrictEndpoint<"/sso/callback/:providerId", {
736
+ declare const callbackSSO: (options?: SSOOptions) => better_call7.StrictEndpoint<"/sso/callback/:providerId", {
737
737
  method: "GET";
738
738
  query: z.ZodObject<{
739
739
  code: z.ZodOptional<z.ZodString>;
@@ -758,7 +758,7 @@ declare const callbackSSO: (options?: SSOOptions) => better_call0.StrictEndpoint
758
758
  } & {
759
759
  use: any[];
760
760
  }, never>;
761
- declare const callbackSSOSAML: (options?: SSOOptions) => better_call0.StrictEndpoint<"/sso/saml2/callback/:providerId", {
761
+ declare const callbackSSOSAML: (options?: SSOOptions) => better_call7.StrictEndpoint<"/sso/saml2/callback/:providerId", {
762
762
  method: "POST";
763
763
  body: z.ZodObject<{
764
764
  SAMLResponse: z.ZodString;
@@ -787,7 +787,7 @@ declare const callbackSSOSAML: (options?: SSOOptions) => better_call0.StrictEndp
787
787
  } & {
788
788
  use: any[];
789
789
  }, never>;
790
- declare const acsEndpoint: (options?: SSOOptions) => better_call0.StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
790
+ declare const acsEndpoint: (options?: SSOOptions) => better_call7.StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
791
791
  method: "POST";
792
792
  params: z.ZodObject<{
793
793
  providerId: z.ZodOptional<z.ZodString>;
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as SSOOptions, i as SAMLConfig, n as sso, o as SSOProvider, r as OIDCConfig, t as SSOPlugin } from "./index-D-JmJR9N.mjs";
1
+ import { a as SSOOptions, i as SAMLConfig, n as sso, o as SSOProvider, r as OIDCConfig, t as SSOPlugin } from "./index-DCyJckhH.mjs";
2
2
  export { OIDCConfig, SAMLConfig, SSOOptions, SSOPlugin, SSOProvider, sso };
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",
4
+ "version": "1.4.6-beta.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
7
7
  "homepage": "https://www.better-auth.com/docs/plugins/sso",
@@ -60,18 +60,19 @@
60
60
  "devDependencies": {
61
61
  "@types/body-parser": "^1.19.6",
62
62
  "@types/express": "^5.0.5",
63
- "better-call": "1.1.3",
64
- "body-parser": "^2.2.0",
63
+ "better-call": "1.1.4",
64
+ "body-parser": "^2.2.1",
65
65
  "express": "^5.1.0",
66
- "oauth2-mock-server": "^7.2.1",
66
+ "oauth2-mock-server": "^8.2.0",
67
67
  "tsdown": "^0.16.0",
68
- "better-auth": "1.4.4"
68
+ "better-auth": "1.4.6-beta.2"
69
69
  },
70
70
  "peerDependencies": {
71
- "better-auth": "1.4.4"
71
+ "better-auth": "1.4.6-beta.2"
72
72
  },
73
73
  "scripts": {
74
74
  "test": "vitest",
75
+ "lint:package": "publint run --strict",
75
76
  "build": "tsdown",
76
77
  "dev": "tsdown --watch",
77
78
  "typecheck": "tsc --project tsconfig.json"
package/src/saml.test.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import type { createServer } from "node:http";
1
3
  import { betterFetch } from "@better-fetch/fetch";
2
4
  import { betterAuth } from "better-auth";
3
5
  import { memoryAdapter } from "better-auth/adapters/memory";
@@ -6,14 +8,12 @@ import { setCookieToHeader } from "better-auth/cookies";
6
8
  import { bearer } from "better-auth/plugins";
7
9
  import { getTestInstance } from "better-auth/test";
8
10
  import bodyParser from "body-parser";
9
- import { randomUUID } from "crypto";
10
11
  import type {
11
12
  Application as ExpressApp,
12
13
  Request as ExpressRequest,
13
14
  Response as ExpressResponse,
14
15
  } from "express";
15
16
  import express from "express";
16
- import type { createServer } from "http";
17
17
  import * as saml from "samlify";
18
18
  import {
19
19
  afterAll,