Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Fixes for package bugs waiting on upstream merges.
| Package | Version | Format | Fix | PR |
| :--- | :--- | :--- | :--- | :--- |
| [`@expo/ui`](packages/@expo/ui/) | `56.0.0-canary-20260212-4f61309` | Bun | Missing `capsule` + `ellipse` shapes in `clipShape`/`mask`, broken `foregroundStyle` hierarchical handling | [expo/expo#43158](https://github.com/expo/expo/pull/43158) |
| [`@convex-dev/better-auth`](packages/@convex-dev/better-auth/) | `0.10.10` | patch-package | Cookie expiry string comparison, null session cache, wrong `isAuthenticated` check | [get-convex/better-auth#218](https://github.com/get-convex/better-auth/pull/218) |
| [`@convex-dev/better-auth`](packages/@convex-dev/better-auth/) | `0.10.10` | patch-package, Bun | Cookie expiry string comparison, null session cache, wrong `isAuthenticated` check | [get-convex/better-auth#218](https://github.com/get-convex/better-auth/pull/218) |
| [`@convex-dev/better-auth`](packages/@convex-dev/better-auth/) | `0.10.10` | Bun, patch-package | Pinned `better-auth` peer dep `1.4.9` blocks newer 1.4.x versions | [get-convex/better-auth#245](https://github.com/get-convex/better-auth/pull/245) |
| [`@tobilu/qmd`](packages/@tobilu/qmd/) | `1.0.6` | patch-package, Bun | `typescript` in `peerDependencies` instead of `devDependencies`, missing `tsc` in `prepare` script | [tobi/qmd#197](https://github.com/tobi/qmd/pull/197) |
| [`bun`](packages/oven-sh/bun/) | `1.3.9` | Bun | `includePrerelease` semantics for peer dep semver validation | [oven-sh/bun#27085](https://github.com/oven-sh/bun/pull/27085) |
| [`bun`](packages/oven-sh/bun/) | `1.3.9` | Bun | Invalid YAML sequence in `update-root-certs` workflow `labels` field | [oven-sh/bun#27086](https://github.com/oven-sh/bun/pull/27086) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
diff --git a/dist/plugins/cross-domain/client.js b/dist/plugins/cross-domain/client.js
index ae0c621..f702b32 100644
--- a/dist/plugins/cross-domain/client.js
+++ b/dist/plugins/cross-domain/client.js
@@ -26,7 +26,7 @@ export function getSetCookie(header, prevCookie) {
: null;
toSetCookie[key] = {
value: cookie["value"],
- expires,
+ expires: expires ? expires.toISOString() : null,
};
});
if (prevCookie) {
@@ -52,7 +52,7 @@ export function getCookie(cookie) {
// noop
}
const toSend = Object.entries(parsed).reduce((acc, [key, value]) => {
- if (value.expires && value.expires < new Date()) {
+ if (value.expires && new Date(value.expires) < new Date()) {
return acc;
}
return `${acc}; ${key}=${value.value}`;
@@ -113,7 +113,14 @@ export const crossDomainClient = (opts = {}) => {
*/
getSessionData: () => {
const sessionData = storage?.getItem(localCacheName);
- return sessionData ? JSON.parse(sessionData) : null;
+ if (!sessionData) return null;
+ try {
+ const parsed = JSON.parse(sessionData);
+ if (parsed && typeof parsed === "object" && Object.keys(parsed).length === 0) return null;
+ return parsed;
+ } catch {
+ return null;
+ }
},
};
},
@@ -140,6 +147,9 @@ export const crossDomainClient = (opts = {}) => {
!opts?.disableCache) {
const data = context.data;
storage.setItem(localCacheName, JSON.stringify(data));
+ if (data === null) {
+ storage.setItem(cookieName, "{}");
+ }
}
},
},
diff --git a/dist/react/index.js b/dist/react/index.js
index eb292f6..235eef4 100644
--- a/dist/react/index.js
+++ b/dist/react/index.js
@@ -73,7 +73,7 @@ function useUseAuthFromBetterAuth(authClient, initialToken) {
[sessionId]);
return useMemo(() => ({
isLoading: isSessionPending,
- isAuthenticated: session !== null,
+ isAuthenticated: Boolean(session?.session),
fetchAccessToken,
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/package.json b/package.json
index fcff31a..c857a14 100644
--- a/package.json
+++ b/package.json
@@ -103,7 +103,7 @@
}
},
"peerDependencies": {
- "better-auth": "1.4.9",
+ "better-auth": ">=1.4.9 <1.5.0",
"convex": "^1.25.0",
"react": "^18.3.1 || ^19.0.0",
"react-dom": "^18.3.1 || ^19.0.0"
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
diff --git a/node_modules/@convex-dev/better-auth/dist/plugins/cross-domain/client.js b/node_modules/@convex-dev/better-auth/dist/plugins/cross-domain/client.js
index ae0c621..b2d0788 100644
index ae0c621..f702b32 100644
--- a/node_modules/@convex-dev/better-auth/dist/plugins/cross-domain/client.js
+++ b/node_modules/@convex-dev/better-auth/dist/plugins/cross-domain/client.js
@@ -26,7 +26,7 @@ export function getSetCookie(header, prevCookie) {
: null;
toSetCookie[key] = {
value: cookie["value"],
- expires,
+ expires: expires ? expires.toISOString() : null,
};
});
if (prevCookie) {
@@ -52,7 +52,7 @@ export function getCookie(cookie) {
// noop
}
Expand All @@ -11,7 +20,23 @@ index ae0c621..b2d0788 100644
return acc;
}
return `${acc}; ${key}=${value.value}`;
@@ -140,6 +140,9 @@ export const crossDomainClient = (opts = {}) => {
@@ -113,7 +113,14 @@ export const crossDomainClient = (opts = {}) => {
*/
getSessionData: () => {
const sessionData = storage?.getItem(localCacheName);
- return sessionData ? JSON.parse(sessionData) : null;
+ if (!sessionData) return null;
+ try {
+ const parsed = JSON.parse(sessionData);
+ if (parsed && typeof parsed === "object" && Object.keys(parsed).length === 0) return null;
+ return parsed;
+ } catch {
+ return null;
+ }
},
};
},
@@ -140,6 +147,9 @@ export const crossDomainClient = (opts = {}) => {
!opts?.disableCache) {
const data = context.data;
storage.setItem(localCacheName, JSON.stringify(data));
Expand All @@ -21,15 +46,6 @@ index ae0c621..b2d0788 100644
}
},
},
@@ -165,7 +168,7 @@ export const crossDomainClient = (opts = {}) => {
error: null,
isPending: false,
});
- storage.setItem(localCacheName, "{}");
+ storage.setItem(localCacheName, "null");
}
return {
url,
diff --git a/node_modules/@convex-dev/better-auth/dist/react/index.js b/node_modules/@convex-dev/better-auth/dist/react/index.js
index eb292f6..235eef4 100644
--- a/node_modules/@convex-dev/better-auth/dist/react/index.js
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@convex-dev/better-auth/package.json b/node_modules/@convex-dev/better-auth/package.json
index fcff31a..c857a14 100644
--- a/node_modules/@convex-dev/better-auth/package.json
+++ b/node_modules/@convex-dev/better-auth/package.json
@@ -103,7 +103,7 @@
}
},
"peerDependencies": {
- "better-auth": "1.4.9",
+ "better-auth": ">=1.4.9 <1.5.0",
"convex": "^1.25.0",
"react": "^18.3.1 || ^19.0.0",
"react-dom": "^18.3.1 || ^19.0.0"