@better-auth/infra 0.4.2 → 0.4.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/CHANGELOG.md CHANGED
@@ -5,8 +5,15 @@ All notable changes to `@better-auth/infra` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.4.3] - 2026-08-25
9
+
10
+ ### Added
11
+
12
+ - **SAML `wantAssertionsSigned`** — Dash SSO create/update accept and persist `samlConfig.wantAssertionsSigned` (default `true`). Required for directory sync SAML pairing; can be disabled only when the IdP cannot sign assertions.
13
+
8
14
  ## [0.4.2] - 2026-08-21
9
15
 
16
+
10
17
  ### Fixed
11
18
 
12
19
  - **Identification on OAuth callbacks** — Sentinel and dash run identification on GET OAuth callback routes and persist `X-Request-Id` as the `__infra-rid` cookie in an after hook, so visitor identity resolves from KV across redirect-based social/OAuth sign-in (where identify headers are absent).
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as hash, o as createKV } from "./crypto-D3yZH0Cy.mjs";
2
- import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, s as generateRequestId, t as createPowRetryTimeout } from "./pow-retry-jWGI__oh.mjs";
1
+ import { n as hash, o as createKV } from "./crypto-SmxL66Tk.mjs";
2
+ import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, s as generateRequestId, t as createPowRetryTimeout } from "./pow-retry-BWDJUT8X.mjs";
3
3
  import { env } from "@better-auth/core/env";
4
4
  //#region src/sentinel/fingerprint.ts
5
5
  function murmurhash3(str, seed = 0) {
@@ -1,7 +1,7 @@
1
1
  import { env } from "@better-auth/core/env";
2
2
  //#endregion
3
3
  //#region src/version.ts
4
- const PLUGIN_VERSION = "0.4.2";
4
+ const PLUGIN_VERSION = "0.4.3";
5
5
  //#endregion
6
6
  //#region src/constants.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { i as INFRA_USER_AGENT } from "./constants-CDhjfr8S.mjs";
1
+ import { i as INFRA_USER_AGENT } from "./constants-CA5EAv5K.mjs";
2
2
  import { createFetch } from "@better-fetch/fetch";
3
3
  import { sha256 } from "@noble/hashes/sha2.js";
4
4
  //#region src/fetch.ts
package/dist/email.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-CDhjfr8S.mjs";
1
+ import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-CA5EAv5K.mjs";
2
2
  import { logger } from "better-auth";
3
3
  import { env } from "@better-auth/core/env";
4
4
  import { createFetch } from "@better-fetch/fetch";
package/dist/index.d.mts CHANGED
@@ -1157,6 +1157,7 @@ declare const dash: <O extends DashOptions>(options?: O) => {
1157
1157
  entryPoint: import("zod").ZodOptional<import("zod").ZodString>;
1158
1158
  cert: import("zod").ZodOptional<import("zod").ZodString>;
1159
1159
  entityId: import("zod").ZodOptional<import("zod").ZodString>;
1160
+ wantAssertionsSigned: import("zod").ZodOptional<import("zod").ZodBoolean>;
1160
1161
  mapping: import("zod").ZodOptional<import("zod").ZodObject<{
1161
1162
  id: import("zod").ZodOptional<import("zod").ZodString>;
1162
1163
  email: import("zod").ZodOptional<import("zod").ZodString>;
@@ -1214,6 +1215,7 @@ declare const dash: <O extends DashOptions>(options?: O) => {
1214
1215
  entryPoint: import("zod").ZodOptional<import("zod").ZodString>;
1215
1216
  cert: import("zod").ZodOptional<import("zod").ZodString>;
1216
1217
  entityId: import("zod").ZodOptional<import("zod").ZodString>;
1218
+ wantAssertionsSigned: import("zod").ZodOptional<import("zod").ZodBoolean>;
1217
1219
  mapping: import("zod").ZodOptional<import("zod").ZodObject<{
1218
1220
  id: import("zod").ZodOptional<import("zod").ZodString>;
1219
1221
  email: import("zod").ZodOptional<import("zod").ZodString>;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { i as INFRA_USER_AGENT, n as INFRA_API_URL, o as PLUGIN_VERSION, r as INFRA_KV_URL } from "./constants-CDhjfr8S.mjs";
2
- import { a as createAPI, n as hash$1, o as createKV, r as hmacSha256Hex } from "./crypto-D3yZH0Cy.mjs";
1
+ import { i as INFRA_USER_AGENT, n as INFRA_API_URL, o as PLUGIN_VERSION, r as INFRA_KV_URL } from "./constants-CA5EAv5K.mjs";
2
+ import { a as createAPI, n as hash$1, o as createKV, r as hmacSha256Hex } from "./crypto-SmxL66Tk.mjs";
3
3
  import { EMAIL_TEMPLATES, createEmailSender, sendBulkEmails, sendEmail } from "./email.mjs";
4
4
  import { getCurrentAdapter, getCurrentAuthContext, getCurrentDBAdapterAsyncLocalStorage, runWithTransaction } from "@better-auth/core/context";
5
5
  import { APIError, generateId, getAuthTables, logger } from "better-auth";
@@ -8236,6 +8236,7 @@ const samlConfigSchema = z.object({
8236
8236
  entryPoint: z.string().optional(),
8237
8237
  cert: z.string().optional(),
8238
8238
  entityId: z.string().optional(),
8239
+ wantAssertionsSigned: z.boolean().optional(),
8239
8240
  mapping: z.object({
8240
8241
  /** @deprecated Removed in better-auth 1.7+; SAML subject is NameID. */
8241
8242
  id: z.string().optional(),
@@ -8304,6 +8305,7 @@ async function resolveSAMLConfig(samlConfig, providerId, baseURL, ctx) {
8304
8305
  config: {
8305
8306
  issuer: ba17OrLater && !idpMetadataXml ? spIssuer : samlConfig.entityId ?? spIssuer,
8306
8307
  idpMetadata,
8308
+ wantAssertionsSigned: samlConfig.wantAssertionsSigned ?? true,
8307
8309
  ...saml17OrNewer ? {
8308
8310
  entryPoint: resolvedEntryPoint,
8309
8311
  ...samlConfig.cert ? { cert: samlConfig.cert } : {}
package/dist/native.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { o as createKV, t as bytesToHex } from "./crypto-D3yZH0Cy.mjs";
2
- import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, t as createPowRetryTimeout } from "./pow-retry-jWGI__oh.mjs";
1
+ import { o as createKV, t as bytesToHex } from "./crypto-SmxL66Tk.mjs";
2
+ import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, t as createPowRetryTimeout } from "./pow-retry-BWDJUT8X.mjs";
3
3
  import { env } from "@better-auth/core/env";
4
4
  import { Dimensions, InteractionManager, PixelRatio, Platform } from "react-native";
5
5
  //#region src/sentinel/native/components.ts
@@ -1,4 +1,4 @@
1
- import { i as randomBytes, n as hash, t as bytesToHex } from "./crypto-D3yZH0Cy.mjs";
1
+ import { i as randomBytes, n as hash, t as bytesToHex } from "./crypto-SmxL66Tk.mjs";
2
2
  //#region src/dash-client.ts
3
3
  function resolveDashUserId(input, options) {
4
4
  return input.userId || options?.resolveUserId?.({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/infra",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Dashboard and analytics plugin for Better Auth",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -83,7 +83,7 @@
83
83
  "@noble/hashes": "^2.2.0",
84
84
  "@xmldom/xmldom": "^0.9.10",
85
85
  "better-call": "1.3.7",
86
- "jose": "^6.2.4",
86
+ "jose": "^6.2.9",
87
87
  "libphonenumber-js": "^1.13.11"
88
88
  },
89
89
  "peerDependencies": {