@better-auth/electron 1.6.11 → 1.6.12
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/dist/client.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-dnGn0OgM.mjs";
|
|
2
2
|
import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-DxDKRT6e.mjs";
|
|
3
3
|
import { BetterAuthError } from "@better-auth/core/error";
|
|
4
4
|
import { base64, base64Url } from "@better-auth/utils/base64";
|
|
@@ -8,7 +8,7 @@ import * as z from "zod";
|
|
|
8
8
|
import { Buffer } from "node:buffer";
|
|
9
9
|
import { createHash } from "@better-auth/utils/hash";
|
|
10
10
|
import { signInSocial } from "better-auth/api";
|
|
11
|
-
import { parseSetCookieHeader } from "better-auth/cookies";
|
|
11
|
+
import { cookieNameRegex, parseSetCookieHeader } from "better-auth/cookies";
|
|
12
12
|
import electron, { shell } from "electron";
|
|
13
13
|
import { isDevelopment as isDevelopment$1 } from "@better-auth/core/env";
|
|
14
14
|
import { isPublicRoutableHost } from "@better-auth/core/utils/host";
|
|
@@ -474,10 +474,13 @@ function getCookie(cookie) {
|
|
|
474
474
|
try {
|
|
475
475
|
parsed = JSON.parse(cookie);
|
|
476
476
|
} catch (_e) {}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
477
|
+
const pairs = [];
|
|
478
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
479
|
+
if (value.expires && new Date(value.expires) < /* @__PURE__ */ new Date()) continue;
|
|
480
|
+
if (!cookieNameRegex.test(key)) continue;
|
|
481
|
+
pairs.push(`${key}=${encodeURIComponent(value.value)}`);
|
|
482
|
+
}
|
|
483
|
+
return pairs.join("; ");
|
|
481
484
|
}
|
|
482
485
|
/**
|
|
483
486
|
* Compare if session cookies have actually changed by comparing their values.
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-dnGn0OgM.mjs";
|
|
2
2
|
import { createAuthMiddleware } from "@better-auth/core/api";
|
|
3
3
|
import { APIError, BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
4
4
|
import { base64Url } from "@better-auth/utils/base64";
|
package/dist/preload.d.mts
CHANGED
|
@@ -4901,9 +4901,11 @@ interface InternalAdapter<_Options extends BetterAuthOptions = BetterAuthOptions
|
|
|
4901
4901
|
* Atomically consume a single-use verification row by `identifier` and
|
|
4902
4902
|
* return it. Only the first concurrent caller receives the latest row;
|
|
4903
4903
|
* subsequent callers receive `null`. Consuming one row invalidates the
|
|
4904
|
-
* whole identifier so stale rows cannot be replayed.
|
|
4905
|
-
*
|
|
4906
|
-
*
|
|
4904
|
+
* whole identifier so stale rows cannot be replayed. Rows past their
|
|
4905
|
+
* `expiresAt` are treated as already invalid: the row is deleted but
|
|
4906
|
+
* `null` is returned, so callers do not need to gate on `expiresAt`
|
|
4907
|
+
* themselves. Callers MUST gate any state change (issue session, mint
|
|
4908
|
+
* token, change password) on a non-null result.
|
|
4907
4909
|
*
|
|
4908
4910
|
* Replaces the racy `findVerificationValue` + `deleteVerificationByIdentifier`
|
|
4909
4911
|
* pair at single-use credential consumption sites.
|
package/dist/proxy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-dnGn0OgM.mjs";
|
|
2
2
|
import { r as parseProtocolScheme } from "./utils-DxDKRT6e.mjs";
|
|
3
3
|
import { parseCookies } from "better-auth/cookies";
|
|
4
4
|
//#region src/proxy.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/electron",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.12",
|
|
4
4
|
"description": "Better Auth integration for Electron applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
"better-sqlite3": "^12.6.2",
|
|
81
81
|
"electron": "^41.2.2",
|
|
82
82
|
"tsdown": "0.21.1",
|
|
83
|
-
"@better-auth/core": "1.6.
|
|
84
|
-
"better-auth": "1.6.
|
|
83
|
+
"@better-auth/core": "1.6.12",
|
|
84
|
+
"better-auth": "1.6.12"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@better-auth/utils": "0.4.
|
|
87
|
+
"@better-auth/utils": "0.4.1",
|
|
88
88
|
"@better-fetch/fetch": "1.1.21",
|
|
89
89
|
"better-call": "1.3.5",
|
|
90
90
|
"conf": "^15.0.2",
|
|
91
91
|
"electron": ">=36.0.0",
|
|
92
|
-
"@better-auth/core": "^1.6.
|
|
93
|
-
"better-auth": "^1.6.
|
|
92
|
+
"@better-auth/core": "^1.6.12",
|
|
93
|
+
"better-auth": "^1.6.12"
|
|
94
94
|
},
|
|
95
95
|
"peerDependenciesMeta": {
|
|
96
96
|
"electron": {
|